Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2020-07-30 02:13:52 +0300
committerJunio C Hamano <gitster@pobox.com>2020-07-30 19:16:45 +0300
commit9e3bd8a391a3a2a486e4cff6ff7b4de2bac5a15d (patch)
tree37e9ef981c0b7cfa6249ebc62016eee4e242d9ea /t/t3305-notes-fanout.sh
parentd827bce5ede425853d77b710ec93f60e0ebd2efb (diff)
t3305: make hash agnostic
When computing the fanout length, let's use test_oid to look up the hexadecimal size of the hash in question instead of hard-coding a value. 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/t3305-notes-fanout.sh')
-rwxr-xr-xt/t3305-notes-fanout.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t3305-notes-fanout.sh b/t/t3305-notes-fanout.sh
index 3b4753e1b4..94c1b02251 100755
--- a/t/t3305-notes-fanout.sh
+++ b/t/t3305-notes-fanout.sh
@@ -7,7 +7,7 @@ test_description='Test that adding/removing many notes triggers automatic fanout
path_has_fanout() {
path=$1 &&
fanout=$2 &&
- after_last_slash=$((40 - $fanout * 2)) &&
+ after_last_slash=$(($(test_oid hexsz) - $fanout * 2)) &&
echo $path | grep -q "^\([0-9a-f]\{2\}/\)\{$fanout\}[0-9a-f]\{$after_last_slash\}$"
}