summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2020-05-25 21:59:13 +0200
committerJunio C Hamano <gitster@pobox.com>2020-05-27 19:07:07 +0200
commit059d8066f843a09c615be2b7c7e42fd393852ed6 (patch)
treecab9e706229a750af00851e15751604e6be1d37b /t
parentbuiltin/show-index: provide options to determine hash algo (diff)
downloadgit-059d8066f843a09c615be2b7c7e42fd393852ed6.tar.xz
git-059d8066f843a09c615be2b7c7e42fd393852ed6.zip
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>
Diffstat (limited to 't')
-rwxr-xr-xt/t1302-repo-version.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/t/t1302-repo-version.sh b/t/t1302-repo-version.sh
index ce4cff13bb..d60c042ce8 100755
--- a/t/t1302-repo-version.sh
+++ b/t/t1302-repo-version.sh
@@ -8,6 +8,10 @@ test_description='Test repository version check'
. ./test-lib.sh
test_expect_success 'setup' '
+ test_oid_cache <<-\EOF &&
+ version sha1:0
+ version sha256:1
+ EOF
cat >test.patch <<-\EOF &&
diff --git a/test.txt b/test.txt
new file mode 100644
@@ -23,7 +27,7 @@ test_expect_success 'setup' '
'
test_expect_success 'gitdir selection on normal repos' '
- echo 0 >expect &&
+ echo $(test_oid version) >expect &&
git config core.repositoryformatversion >actual &&
git -C test config core.repositoryformatversion >actual2 &&
test_cmp expect actual &&