From: Junio C Hamano Date: Fri, 31 Jul 2026 15:54:06 +0000 (-0700) Subject: Merge branch 'jk/cat-file-batch-wo-type-fix' into jch X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5f21c5ff636c62da22961e23fc19289c3f7766ff;p=thirdparty%2Fgit.git Merge branch 'jk/cat-file-batch-wo-type-fix' into jch 'git cat-file --batch-command' that asked for 'contents' without 'type' segfaults, which has been corrected. * jk/cat-file-batch-wo-type-fix: cat-file: handle content request for --batch-command without type --- 5f21c5ff636c62da22961e23fc19289c3f7766ff diff --cc t/t1006-cat-file.sh index 0c1dc0fb40,d0db1f2a29..72fc8acc61 --- a/t/t1006-cat-file.sh +++ b/t/t1006-cat-file.sh @@@ -1337,9 -1348,17 +1337,17 @@@ test_expect_success 'batch-command flus test_expect_success 'batch-command flush without --buffer' ' echo "flush" >cmd && test_expect_code 128 git cat-file --batch-command err && - grep "^fatal:.*flush is only for --buffer mode.*" err + test_grep "^fatal:.*flush is only for --buffer mode.*" err ' + test_expect_success 'batch-command contents auto-handles type' ' + echo "HEAD" | + git cat-file --batch="%(objectname)" >expect && + echo "contents HEAD" | + git cat-file --batch-command="%(objectname)" >actual && + test_cmp expect actual + ' + perl_script=' use warnings; use strict;