diff options
author | Jeff King <peff@peff.net> | 2015-06-22 07:06:32 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-06-26 09:24:42 -0700 |
commit | 3115ee45c8c7c0b753663890b13ec0e14fe4c0d7 (patch) | |
tree | db7ceda377412cbdf84cce0d96fc7f432a2c415d /t/t1006-cat-file.sh | |
parent | 6a951937ae1abb5fe438bfb41ebb28c5abe0419d (diff) | |
download | git-3115ee45c8c7c0b753663890b13ec0e14fe4c0d7.tar.gz git-3115ee45c8c7c0b753663890b13ec0e14fe4c0d7.tar.xz |
cat-file: sort and de-dup output of --batch-all-objects
The sorting we could probably live without, but printing
duplicates is just a hassle for the user, who must then
de-dup themselves (or risk a wrong answer if they are doing
something like counting objects with a particular property).
Signed-off-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-x | t/t1006-cat-file.sh | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/t/t1006-cat-file.sh b/t/t1006-cat-file.sh index 2b4220a60..4f38078ff 100755 --- a/t/t1006-cat-file.sh +++ b/t/t1006-cat-file.sh @@ -548,7 +548,7 @@ test_expect_success 'git cat-file --batch --follow-symlink returns correct sha a ' test_expect_success 'cat-file --batch-all-objects shows all objects' ' - # make new repos so we now the full set of objects; we will + # make new repos so we know the full set of objects; we will # also make sure that there are some packed and some loose # objects, some referenced and some not, and that there are # some available only via alternates. @@ -569,8 +569,7 @@ test_expect_success 'cat-file --batch-all-objects shows all objects' ' ) >>expect.unsorted && sort <expect.unsorted >expect && git -C all-two cat-file --batch-all-objects \ - --batch-check="%(objectname)" >actual.unsorted && - sort <actual.unsorted >actual && + --batch-check="%(objectname)" >actual && test_cmp expect actual ' |