chiark / gitweb /
badcommit-fixup: Merge from a filtered view of my personal playground
[dgit.git] / tests / tests / drs-push-rejects
index f87cbdcbefc5f873b32c74b3b36e830534c30dae..8c4ad83cd75acee8b65d289d287404e8f4f05768 100755 (executable)
@@ -84,6 +84,8 @@ for h in object type tag; do
     git update-ref refs/tags/$tag_name $badtag
 
     mustfail 'multiple headers '$h' in signed tag object' $push_spec
+
+    t-expect-fsck-fail $badtag
   done
 done
 
@@ -139,6 +141,19 @@ mktag
 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
+)
+t-expect-fsck-fail $badcommit
+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
@@ -191,4 +206,4 @@ mustfail "not in permissions list although in keyring" $push_spec
 prep_dm_mangle ''
 mustsucceed $push_spec # succeeds
 
-echo ok.
+t-ok