X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=t%2Ft1007-hash-object.sh;h=6d52b824b115964c5551aaf4284205b98b885ce3;hb=d0ef5a7e427d18657b8d53223adc1d7132d6ab79;hp=dd32432d626e4f3d192c2bbe4824772025bb08b1;hpb=6df2ffaeef3f593214e88d9c148a7f3504f13e5e;p=git.git diff --git a/t/t1007-hash-object.sh b/t/t1007-hash-object.sh index dd32432d6..6d52b824b 100755 --- a/t/t1007-hash-object.sh +++ b/t/t1007-hash-object.sh @@ -188,4 +188,17 @@ for args in "-w --stdin-paths" "--stdin-paths -w"; do pop_repo done +test_expect_success 'corrupt tree' ' + echo abc >malformed-tree + test_must_fail git hash-object -t tree malformed-tree +' + +test_expect_success 'corrupt commit' ' + test_must_fail git hash-object -t commit --stdin