diff options
Diffstat (limited to 'tests/tests/tag-updates')
-rwxr-xr-x | tests/tests/tag-updates | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/tests/tag-updates b/tests/tests/tag-updates new file mode 100755 index 0000000..824fd1e --- /dev/null +++ b/tests/tests/tag-updates @@ -0,0 +1,37 @@ +#!/bin/bash +set -e +. tests/lib + +t-tstunt-parsechangelog +t-prep-newpackage example 1.0 + +cd $p +revision=1 +t-dgit build +t-dgit push --new + +tagref=`t-v-tag` +tagname=${tn#refs/tags} + +(set -e + cd $dgitrepo + git tag -m UNWANTED unwanted dgit/sid) + +fetch-check () { + t-dgit fetch + t-ref-same-exact $tagref + t-refs-notexist refs/tags/unwanted +} + +t-ref-same-exact $tagref +fetch-check + +git tag -d $tagname +fetch-check + +git tag -f -m BOGUS $tagname HEAD +t-refs-same-start +t-ref-same-exact $tagref +fetch-check + +t-ok |