print or die $!;
' ../basetag
+git cat-file tag test-dummy/1.0-1 >../raw-base
+
mv-ident () {
local f=$tmp/$1
if test -e $f; then
grep ": failed, emailed" ../tagupl/overall.log
}
+raw-mangled () {
+ git update-ref refs/tags/$tagname \
+ $(git hash-object -w -t tag ../tagobj-$ident)
+ t-tagupl-run-drs
+}
+
tagname=test-dummy/1.2
t-expect-fail E:'failed command: git fetch' \
t-tagupl-run-drs
expect-email vermatch 's/^example release /$&3/' 'reject: version mismatch'
+expect-email unkinfo 's/^\[dgit please-upload/$& Rejectme/' \
+ 'unknown dgit info in tag'
+
+expect-quit unkdistro 's/test-dummy/ubuntu/ if m/^\[dgit/' \
+ 'not for this distro'
+
+expect-email notsplit 's/ split / no-split /' 'reject: missing "split"'
+
+expect-email upsnot1 's/ upstream=/ uxstream=/' \
+ 'reject: upstream tag and not commitish'
+
+expect-email upsnot2 's/ upstream-tag=/ uxstream-tag=/' \
+ 'reject: upstream tag and not commitish'
+
+expect-email bupstag1 's/ upstream-tag=/$&:/' \
+ "failed command: git check-ref-format"
+
+expect-email bupstag2 's/ upstream-tag=/$&x/' \
+ "Couldn't find remote ref refs/tags/xupstream"
+
+expect-email upsmism 's/ upstream=/$&3/' \
+ "but tag refers to"
+
# we are going to trash $p because it will contain corrupted objects
# which makes our end-of-test fsck fail
cp -al ../$p ../$p.save
cd ../$p
next-mangle badtagger
-git cat-file tag test-dummy/1.0-1 | perl -pe '
+perl -pe <../raw-base '
s/\+\d+$/xyz/ if m/^tagger /;
exit 0 if m/^$/;
' >../tagobj-$ident
echo >>../tagobj-$ident
cat ../basetag >>../tagobj-$ident
-git update-ref $tagname $(git hash-object -w -t tag ../tagobj-$ident)
+raw-mangled
+grep 'failed to fish tagger out of tag' ../tagupl/overall.log
cd ..
rm -rf $p