Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-11-06 22:00:57 +0400
committerJunio C Hamano <gitster@pobox.com>2013-11-06 23:03:33 +0400
commit4ef8d1dd03d3b8adf81b4b81b2231128e3591f36 (patch)
tree102db9c3334ecb998e7b7d3a64ca711a6df4b17e /t/t1006-cat-file.sh
parentd619cfc7490481652833dff820e04263869c8861 (diff)
sha1_loose_object_info(): do not return success on missing object
Since 052fe5ea (sha1_loose_object_info: make type lookup optional, 2013-07-12), sha1_loose_object_info() returns happily without checking if the object in question exists, which is not what the the caller sha1_object_info_extended() expects; the caller does not even bother checking the existence of the object itself. Noticed-by: Sven Brauch <svenbrauch@googlemail.com> Helped-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1006-cat-file.sh')
-rwxr-xr-xt/t1006-cat-file.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t1006-cat-file.sh b/t/t1006-cat-file.sh
index 4e911fb43d..558f0f5292 100755
--- a/t/t1006-cat-file.sh
+++ b/t/t1006-cat-file.sh
@@ -179,6 +179,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