summaryrefslogtreecommitdiff
path: root/t/t5318-commit-graph.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2018-10-10 12:37:16 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-10-10 12:37:16 +0900
commitd555663f16fb1bc28ebc44a4e78ff4e277c3b69e (patch)
tree594a810932672a5dce8fb9e7fac51c9969b1b281 /t/t5318-commit-graph.sh
parentMerge branch 'nd/test-tool' (diff)
parentt5318: use test_oid for HASH_LEN (diff)
downloadtgif-d555663f16fb1bc28ebc44a4e78ff4e277c3b69e.tar.xz
Merge branch 'bc/hash-independent-tests'
Various tests have been updated to make it easier to swap the hash function used for object identification. * bc/hash-independent-tests: t5318: use test_oid for HASH_LEN t1407: make hash size independent t1406: make hash-size independent t1405: make hash size independent t1400: switch hard-coded object ID to variable t1006: make hash size independent t0064: make hash size independent t0002: abstract away SHA-1 specific constants t0000: update tests for SHA-256 t0000: use hash translation table t: add test functions to translate hash-related values
Diffstat (limited to 't/t5318-commit-graph.sh')
-rwxr-xr-xt/t5318-commit-graph.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/t/t5318-commit-graph.sh b/t/t5318-commit-graph.sh
index 0c500f7ca2..75fe09521f 100755
--- a/t/t5318-commit-graph.sh
+++ b/t/t5318-commit-graph.sh
@@ -8,7 +8,8 @@ test_expect_success 'setup full repo' '
cd "$TRASH_DIRECTORY/full" &&
git init &&
git config core.commitGraph true &&
- objdir=".git/objects"
+ objdir=".git/objects" &&
+ test_oid_init
'
test_expect_success 'verify graph with no graph file' '
@@ -273,7 +274,7 @@ test_expect_success 'git commit-graph verify' '
NUM_COMMITS=9
NUM_OCTOPUS_EDGES=2
-HASH_LEN=20
+HASH_LEN="$(test_oid rawsz)"
GRAPH_BYTE_VERSION=4
GRAPH_BYTE_HASH=5
GRAPH_BYTE_CHUNK_COUNT=6