prep () {
local suite=$1
- local csuite=$2
+ csuite=$2
cp $tmp/masters/* $tmp/.
tag_signer='-u Senatus'
tag_message="$p release $version for $suite ($csuite) [dgit]"
+ re-prep
+}
+re-prep () {
tag_name=$tagpfx/$version
push_spec1="HEAD:refs/dgit/$csuite"
push_spec2="refs/tags/$tag_name"
mustfail 'tag name in tag is wrong' \
refs/tags/$tagpfx/wombat:refs/tags/$tagpfx/$version $push_spec1
+echo ====
+badcommit=$(
+ git cat-file commit HEAD | \
+ perl -pe 's/^committer.*\n//' | \
+ git hash-object -w -t commit --stdin
+)
+git checkout -b broken $badcommit
+prep unstable sid
+mktag
+mustfail "corrupted object $badcommit" $push_spec
+
+git checkout dgit/sid
prep unstable sid
mktag
mustsucceed $push_spec # succeeds
git commit --allow-empty -m 'Dummy update'
mktag
mustfail 'not replacing previously-pushed version' +$push_spec1 +$push_spec2
+
+t-newtag
+re-prep
+mktag
+mustfail 'not replacing previously-pushed version' +$push_spec1 +$push_spec2
+
git reset --hard HEAD~
prep_dm_mangle () {