summaryrefslogtreecommitdiff
path: root/t/t1302-repo-version.sh
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2020-05-25 19:59:13 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-05-27 17:07:07 (GMT)
commit059d8066f843a09c615be2b7c7e42fd393852ed6 (patch)
treecab9e706229a750af00851e15751604e6be1d37b /t/t1302-repo-version.sh
parent88a09a557c7571760b3ded75764bf3b1fd0e8bf0 (diff)
downloadgit-059d8066f843a09c615be2b7c7e42fd393852ed6.zip
git-059d8066f843a09c615be2b7c7e42fd393852ed6.tar.gz
git-059d8066f843a09c615be2b7c7e42fd393852ed6.tar.bz2
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/t1302-repo-version.sh')
-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 ce4cff1..d60c042 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 &&