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 <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
brian m. carlson committed
May 25, 2020 at 19:59 UTC
059d8066f843a09c615be2b7c7e42fd393852ed6
1 file changed
+5
-1
t/t1302-repo-version.sh
+5
-1
@@ -8,6 +8,10 @@ test_description='Test repository version check'
8
. ./test-lib.sh
9
10
test_expect_success 'setup' '
11
+ test_oid_cache <<-\EOF &&
12
+ version sha1:0
13
+ version sha256:1
14
+ EOF
15
cat >test.patch <<-\EOF &&
16
diff --git a/test.txt b/test.txt
17
new file mode 100644
@@ -23,7 +27,7 @@ test_expect_success 'setup' '
27
'
28
29
test_expect_success 'gitdir selection on normal repos' '
26
- echo 0 >expect &&
30
+ echo $(test_oid version) >expect &&
31
git config core.repositoryformatversion >actual &&
32
git -C test config core.repositoryformatversion >actual2 &&
33
test_cmp expect actual &&