diff --git a/t/t3800-mktag.sh b/t/t3800-mktag.sh index 951e6d39c2..78c6f64e36 100755 --- a/t/t3800-mktag.sh +++ b/t/t3800-mktag.sh @@ -16,6 +16,8 @@ check_verify_failure () { message=$2 && shift 2 && + no_strict= && + fsck_obj_ok= && no_strict= && while test $# != 0 do @@ -23,6 +25,9 @@ check_verify_failure () { --no-strict) no_strict=yes ;; + --fsck-obj-ok) + fsck_obj_ok=yes + ;; esac && shift done && @@ -37,6 +42,23 @@ check_verify_failure () { git mktag --no-strict 0 +0000 EOF check_verify_failure 'verify object (hash/type) check -- correct type, nonexisting object' \ - '^fatal: could not read tagged object' + '^fatal: could not read tagged object' \ + --fsck-obj-ok cat >tag.sig < 0 +0000 EOF check_verify_failure 'verify object (hash/type) check -- mismatched type, valid object' \ - '^fatal: object.*tagged as.*tree.*but is.*commit' + '^fatal: object.*tagged as.*tree.*but is.*commit' \ + --fsck-obj-ok ############################################################ # 9.5. verify object (hash/type) check -- replacement @@ -245,7 +269,8 @@ tagger . <> 0 +0000 EOF check_verify_failure 'verify object (hash/type) check -- mismatched type, valid object' \ - '^fatal: object.*tagged as.*tree.*but is.*blob' + '^fatal: object.*tagged as.*tree.*but is.*blob' \ + --fsck-obj-ok ############################################################ # 10. verify tag-name check @@ -260,7 +285,8 @@ EOF check_verify_failure 'verify tag-name check' \ '^error:.* badTagName:' \ - --no-strict + --no-strict \ + --fsck-obj-ok ############################################################ # 11. tagger line label check #1 @@ -275,7 +301,8 @@ EOF check_verify_failure '"tagger" line label check #1' \ '^error:.* missingTaggerEntry:' \ - --no-strict + --no-strict \ + --fsck-obj-ok ############################################################ # 12. tagger line label check #2 @@ -291,7 +318,8 @@ EOF check_verify_failure '"tagger" line label check #2' \ '^error:.* missingTaggerEntry:' \ - --no-strict + --no-strict \ + --fsck-obj-ok ############################################################ # 13. allow missing tag author name like fsck @@ -321,7 +349,8 @@ EOF check_verify_failure 'disallow malformed tagger' \ '^error:.* badEmail:' \ - --no-strict + --no-strict \ + --fsck-obj-ok ############################################################ # 15. allow empty tag email @@ -446,7 +475,8 @@ EOF check_verify_failure 'detect invalid header entry' \ '^error:.* extraHeaderEntry:' \ - --no-strict + --no-strict \ + --fsck-obj-ok test_expect_success 'invalid header entry config & fsck' ' test_must_fail git mktag