X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=tests%2Ftests%2Fdrs-push-rejects;h=f87cbdcbefc5f873b32c74b3b36e830534c30dae;hp=6f2797a04fbbb49bffefc4b99278657bc3f3cbca;hb=fd18e72ae4857dea79a492c7047af611ece9d1d5;hpb=ff53225eafcc9e53998f9f49085a366f3f98fc9c diff --git a/tests/tests/drs-push-rejects b/tests/tests/drs-push-rejects index 6f2797a0..f87cbdcb 100755 --- a/tests/tests/drs-push-rejects +++ b/tests/tests/drs-push-rejects @@ -27,10 +27,13 @@ mustsucceed () { 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" @@ -146,6 +149,12 @@ mustfail 'push is missing head ref update' $push_spec1 +$push_spec2 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 () {