X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft1007-hash-object.sh;h=6d52b824b115964c5551aaf4284205b98b885ce3;hb=1de0746d849c64e1f4d160f9915d87d39c0794ea;hp=dd32432d626e4f3d192c2bbe4824772025bb08b1;hpb=e5498e8a9f9a596ecff78426bbf904626cd7863a;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