summaryrefslogtreecommitdiff
path: root/t/t1406-submodule-ref-store.sh
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2018-09-13 05:17:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-09-17 15:10:32 (GMT)
commitb1484ca94a146470ae6bacc86afcf336d872dd4d (patch)
tree7e685a30ae066947b952a5c2760e277a5fbd99d5 /t/t1406-submodule-ref-store.sh
parent63477b328e43033ddd3f85bbfb7a442e73298403 (diff)
downloadgit-b1484ca94a146470ae6bacc86afcf336d872dd4d.zip
git-b1484ca94a146470ae6bacc86afcf336d872dd4d.tar.gz
git-b1484ca94a146470ae6bacc86afcf336d872dd4d.tar.bz2
t1406: make hash-size independent
Instead of hard-coding a 40-based constant, split the output of for-each-ref and for-each-reflog by field. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1406-submodule-ref-store.sh')
-rwxr-xr-xt/t1406-submodule-ref-store.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/t/t1406-submodule-ref-store.sh b/t/t1406-submodule-ref-store.sh
index e093782..d199d87 100755
--- a/t/t1406-submodule-ref-store.sh
+++ b/t/t1406-submodule-ref-store.sh
@@ -39,7 +39,7 @@ test_expect_success 'rename_refs() not allowed' '
'
test_expect_success 'for_each_ref(refs/heads/)' '
- $RUN for-each-ref refs/heads/ | cut -c 42- >actual &&
+ $RUN for-each-ref refs/heads/ | cut -d" " -f 2- >actual &&
cat >expected <<-\EOF &&
master 0x0
new-master 0x0
@@ -48,7 +48,7 @@ test_expect_success 'for_each_ref(refs/heads/)' '
'
test_expect_success 'for_each_ref() is sorted' '
- $RUN for-each-ref refs/heads/ | cut -c 42- >actual &&
+ $RUN for-each-ref refs/heads/ | cut -d" " -f 2- >actual &&
sort actual > expected &&
test_cmp expected actual
'
@@ -65,7 +65,7 @@ test_expect_success 'verify_ref(new-master)' '
'
test_expect_success 'for_each_reflog()' '
- $RUN for-each-reflog | sort | cut -c 42- >actual &&
+ $RUN for-each-reflog | sort | cut -d" " -f 2- >actual &&
cat >expected <<-\EOF &&
HEAD 0x1
refs/heads/master 0x0