chiark / gitweb /
544be162496495b23efd9fb1d79003af6cd6eb73
[dgit.git] / tests / tests / tag-updates
1 #!/bin/bash
2 set -e
3 . tests/lib
4
5 t-tstunt-parsechangelog
6 t-prep-newpackage example 1.0
7
8 cd $p
9 revision=1
10 t-dgit build
11 t-dgit push --new
12
13 tagref=`t-v-tag`
14 tagname=${tn#refs/tags}
15
16 (set -e
17  cd $tmp/git/$p.git
18  git tag -m UNWANTED unwanted dgit/sid)
19
20 fetch-check () {
21         t-dgit fetch
22         t-ref-same-exact $tagref
23         t-refs-notexist refs/tags/unwanted
24         git rev-parse refs/dgit-fetch/sid/tags/unwanted
25 }
26
27 t-ref-same-exact $tagref
28 fetch-check
29
30 git tag -d $tagname
31 fetch-check
32
33 git tag -f -m BOGUS $tagname HEAD
34 t-refs-same-start
35 t-ref-same-exact $tagref
36 fetch-check
37
38 echo done.