diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-12-17 11:31:18 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-12-17 11:31:18 -0800 |
commit | 66c24cd8a4b8db93b5fee81f144d6411ac7e5391 (patch) | |
tree | f41dabc14c1dd81ec21c27928ea6f57e9ee03cca /t/t1006-cat-file.sh | |
parent | Merge branch 'nd/magic-pathspec' into maint (diff) | |
parent | sha1_loose_object_info(): do not return success on missing object (diff) | |
download | tgif-66c24cd8a4b8db93b5fee81f144d6411ac7e5391.tar.xz |
Merge branch 'sb/sha1-loose-object-info-check-existence' into maint
"git cat-file --batch-check=ok" did not check the existence of the
named object.
* sb/sha1-loose-object-info-check-existence:
sha1_loose_object_info(): do not return success on missing object
Diffstat (limited to 't/t1006-cat-file.sh')
-rwxr-xr-x | t/t1006-cat-file.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t1006-cat-file.sh b/t/t1006-cat-file.sh index a420742494..8a1bc5c532 100755 --- a/t/t1006-cat-file.sh +++ b/t/t1006-cat-file.sh @@ -194,6 +194,12 @@ test_expect_success "--batch-check for an emtpy line" ' test " missing" = "$(echo | git cat-file --batch-check)" ' +test_expect_success 'empty --batch-check notices missing object' ' + echo "$_z40 missing" >expect && + echo "$_z40" | git cat-file --batch-check="" >actual && + test_cmp expect actual +' + batch_input="$hello_sha1 $commit_sha1 $tag_sha1 |