Skip to content

Commit 059d806

Browse files
bk2204gitster
authored andcommitted
t1302: expect repo format version 1 for SHA-256
When using SHA-256, we need to take advantage of the extensions section in the config file, so we need to use repository format version 1. Update the test to look for the correct value. Note that test_oid produces a value without a trailing newline, so use echo to ensure we print a trailing newline to compare it correctly against the actual results. Signed-off-by: brian m. carlson <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 88a09a5 commit 059d806

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

t/t1302-repo-version.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ test_description='Test repository version check'
88
. ./test-lib.sh
99

1010
test_expect_success 'setup' '
11+
test_oid_cache <<-\EOF &&
12+
version sha1:0
13+
version sha256:1
14+
EOF
1115
cat >test.patch <<-\EOF &&
1216
diff --git a/test.txt b/test.txt
1317
new file mode 100644
@@ -23,7 +27,7 @@ test_expect_success 'setup' '
2327
'
2428

2529
test_expect_success 'gitdir selection on normal repos' '
26-
echo 0 >expect &&
30+
echo $(test_oid version) >expect &&
2731
git config core.repositoryformatversion >actual &&
2832
git -C test config core.repositoryformatversion >actual2 &&
2933
test_cmp expect actual &&

0 commit comments

Comments
 (0)