summaryrefslogtreecommitdiff
path: root/t/t6100-rev-list-in-order.sh
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2020-07-29 23:13:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-07-30 16:16:45 (GMT)
commit11b6961f8b232bad9643a867894d34cf1d646ad6 (patch)
tree7e0c2efbd19a9ea8eb71affadc9b2b7692ccd772 /t/t6100-rev-list-in-order.sh
parent800e6a7041961b91fb97ab5dfd440983953fe75c (diff)
downloadgit-11b6961f8b232bad9643a867894d34cf1d646ad6.zip
git-11b6961f8b232bad9643a867894d34cf1d646ad6.tar.gz
git-11b6961f8b232bad9643a867894d34cf1d646ad6.tar.bz2
t6100: make hash size independent
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>
Diffstat (limited to 't/t6100-rev-list-in-order.sh')
-rwxr-xr-xt/t6100-rev-list-in-order.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t6100-rev-list-in-order.sh b/t/t6100-rev-list-in-order.sh
index b2bb0a7..e934bc2 100755
--- a/t/t6100-rev-list-in-order.sh
+++ b/t/t6100-rev-list-in-order.sh
@@ -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}
@@ -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}