Skip to content

Commit

Permalink
t6100: make hash size independent
Browse files Browse the repository at this point in the history
Instead of hard-coding a constant 40, split the output of rev-list by
field.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
bk2204 authored and gitster committed Jul 30, 2020
1 parent 800e6a7 commit 11b6961
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions t/t6100-rev-list-in-order.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ test_expect_success 'setup a commit history with trees, blobs' '

test_expect_success 'rev-list --in-commit-order' '
git rev-list --in-commit-order --objects HEAD >actual.raw &&
cut -c 1-40 >actual <actual.raw &&
cut -d" " -f1 >actual <actual.raw &&
git cat-file --batch-check="%(objectname)" >expect.raw <<-\EOF &&
HEAD^{commit}
Expand All @@ -49,7 +49,7 @@ test_expect_success 'rev-list --in-commit-order' '

test_expect_success 'rev-list lists blobs and trees after commits' '
git rev-list --objects HEAD >actual.raw &&
cut -c 1-40 >actual <actual.raw &&
cut -d" " -f1 >actual <actual.raw &&
git cat-file --batch-check="%(objectname)" >expect.raw <<-\EOF &&
HEAD^{commit}
Expand Down

0 comments on commit 11b6961

Please sign in to comment.