diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-05-13 14:05:54 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-05-13 14:05:54 -0700 |
commit | c1c4a878bb70b6f46550ab370bba320a3a5dda70 (patch) | |
tree | 6b39e419dc0505cb07bd0c3f76fdc4fc46e098b9 /t | |
parent | Merge branch 'ep/fix-test-lib-functions-report' into maint (diff) | |
parent | type_from_string_gently: make sure length matches (diff) | |
download | tgif-c1c4a878bb70b6f46550ab370bba320a3a5dda70.tar.xz |
Merge branch 'jk/type-from-string-gently' into maint
"git cat-file bl $blob" failed to barf even though there is no
object type that is "bl".
* jk/type-from-string-gently:
type_from_string_gently: make sure length matches
Diffstat (limited to 't')
-rwxr-xr-x | t/t1007-hash-object.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t1007-hash-object.sh b/t/t1007-hash-object.sh index f83df8eb8b..ebb3a69c8c 100755 --- a/t/t1007-hash-object.sh +++ b/t/t1007-hash-object.sh @@ -201,4 +201,12 @@ test_expect_success 'corrupt tag' ' test_must_fail git hash-object -t tag --stdin </dev/null ' +test_expect_success 'hash-object complains about bogus type name' ' + test_must_fail git hash-object -t bogus --stdin </dev/null +' + +test_expect_success 'hash-object complains about truncated type name' ' + test_must_fail git hash-object -t bl --stdin </dev/null +' + test_done |