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>2021-07-14 02:52:49 +0300
committerJunio C Hamano <gitster@pobox.com>2021-07-14 02:52:49 +0300
commit5d96bcbc0602f96ccee3111ff93b05389cd6eae6 (patch)
tree242c2ce22d0e5a6d54ad3a25335466cf3580fde0 /t/t1006-cat-file.sh
parentd486ca60a51c9cb1fe068803c3f540724e95e83a (diff)
parentee02ac616435cb1da1e02c8b9c220649d3cec40a (diff)
Merge branch 'zh/cat-file-batch-fix'
"git cat-file --batch-all-objects"" misbehaved when "--batch" is in use and did not ask for certain object traits. * zh/cat-file-batch-fix: cat-file: merge two block into one cat-file: handle trivial --batch format with --batch-all-objects
Diffstat (limited to 't/t1006-cat-file.sh')
-rwxr-xr-xt/t1006-cat-file.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/t/t1006-cat-file.sh b/t/t1006-cat-file.sh
index 5d2dc99b74..18b3779ccb 100755
--- a/t/t1006-cat-file.sh
+++ b/t/t1006-cat-file.sh
@@ -586,4 +586,26 @@ test_expect_success 'cat-file --unordered works' '
test_cmp expect actual
'
+test_expect_success 'set up object list for --batch-all-objects tests' '
+ git -C all-two cat-file --batch-all-objects --batch-check="%(objectname)" >objects
+'
+
+test_expect_success 'cat-file --batch="%(objectname)" with --batch-all-objects will work' '
+ git -C all-two cat-file --batch="%(objectname)" <objects >expect &&
+ git -C all-two cat-file --batch-all-objects --batch="%(objectname)" >actual &&
+ cmp expect actual
+'
+
+test_expect_success 'cat-file --batch="%(rest)" with --batch-all-objects will work' '
+ git -C all-two cat-file --batch="%(rest)" <objects >expect &&
+ git -C all-two cat-file --batch-all-objects --batch="%(rest)" >actual &&
+ cmp expect actual
+'
+
+test_expect_success 'cat-file --batch="batman" with --batch-all-objects will work' '
+ git -C all-two cat-file --batch="batman" <objects >expect &&
+ git -C all-two cat-file --batch-all-objects --batch="batman" >actual &&
+ cmp expect actual
+'
+
test_done