git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: <git@vger.kernel.org>
Cc: Matthew DeVore <matvore@google.com>, Eric Wong <e@80x24.org>,
	Matthieu Moy <git@matthieu-moy.fr>
Subject: [PATCH 04/14] t9100: make test work with SHA-256
Date: Fri, 19 Jun 2020 22:39:37 +0000	[thread overview]
Message-ID: <20200619223947.947067-5-sandals@crustytoothpaste.net> (raw)
In-Reply-To: <20200619223947.947067-1-sandals@crustytoothpaste.net>

Compute the relevant tree objects for SHA-256 and use those when
appropriate instead of using the SHA-1 ones.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
---
 t/t9100-git-svn-basic.sh | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh
index 2c309a57d9..9f2d19ecc4 100755
--- a/t/t9100-git-svn-basic.sh
+++ b/t/t9100-git-svn-basic.sh
@@ -208,9 +208,10 @@ name='check imported tree checksums expected tree checksums'
 rm -f expected
 if test_have_prereq UTF8
 then
-	echo tree dc68b14b733e4ec85b04ab6f712340edc5dc936e > expected
+	echo tree dc68b14b733e4ec85b04ab6f712340edc5dc936e > expected.sha1
+	echo tree b95b55b29d771f5eb73aa9b9d52d02fe11a2538c2feb0829f754ce20a91d98eb > expected.sha256
 fi
-cat >> expected <<\EOF
+cat >> expected.sha1 <<\EOF
 tree c3322890dcf74901f32d216f05c5044f670ce632
 tree d3ccd5035feafd17b030c5732e7808cc49122853
 tree d03e1630363d4881e68929d532746b20b0986b83
@@ -220,8 +221,20 @@ tree 149d63cd5878155c846e8c55d7d8487de283f89e
 tree d667270a1f7b109f5eb3aaea21ede14b56bfdd6e
 tree 8f51f74cf0163afc9ad68a4b1537288c4558b5a4
 EOF
+cat >> expected.sha256 <<\EOF
+tree 8d12756699d0b5b110514240a0ff141f6cbf8891fd69ab05e5594196fb437c9f
+tree 8187168d33f7d4ccb8c1cc6e99532810aaccb47658f35d19b3803072d1128d7a
+tree 74e535d85da8ee25eb23d7b506790c5ab3ccdb1ba0826bd57625ed44ef361650
+tree 6fd7dd963e3cdca0cbd6368ed3cfcc8037cc154d2e7719d9d369a0952364fd95
+tree 1fd6cec6aa95102d69266e20419bb62ec2a06372d614b9850ef23ff204103bb4
+tree 6fd7dd963e3cdca0cbd6368ed3cfcc8037cc154d2e7719d9d369a0952364fd95
+tree deb2b7ac79cd8ce6f52af6a5a0a08691e94ba74a2ed55966bb27dbec551730eb
+tree 59e2e936761188476a7752034e8aa0a822b34050c8504b0dfd946407f4bc9215
+EOF
 
-test_expect_success POSIXPERM,SYMLINKS "$name" "test_cmp expected a"
+test_expect_success POSIXPERM,SYMLINKS "$name" '
+	test_cmp expected.$(test_oid algo) a
+'
 
 test_expect_success 'exit if remote refs are ambigious' '
         git config --add svn-remote.svn.fetch \

  parent reply	other threads:[~2020-06-19 22:51 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-19 22:39 [PATCH 00/14] SHA-256 CVS and SVN patches brian m. carlson
2020-06-19 22:39 ` [PATCH 01/14] t9109: make test hash independent brian m. carlson
2020-06-19 22:39 ` [PATCH 02/14] t9168: " brian m. carlson
2020-06-19 22:39 ` [PATCH 03/14] t9108: " brian m. carlson
2020-06-19 22:39 ` brian m. carlson [this message]
2020-06-19 22:39 ` [PATCH 05/14] t9104: make hash size independent brian m. carlson
2020-06-19 22:39 ` [PATCH 06/14] t9101: make hash independent brian m. carlson
2020-06-19 22:39 ` [PATCH 07/14] t/lib-git-svn: make hash size independent brian m. carlson
2020-06-20  8:02   ` Andreas Schwab
2020-06-20 13:18     ` brian m. carlson
2020-06-19 22:39 ` [PATCH 08/14] perl: create and switch variables for hash constants brian m. carlson
2020-06-19 22:39 ` [PATCH 09/14] perl: make Git::IndexInfo work with SHA-256 brian m. carlson
2020-06-19 22:39 ` [PATCH 10/14] perl: make SVN code hash independent brian m. carlson
2020-06-19 22:39 ` [PATCH 11/14] git-svn: set the OID length based on hash algorithm brian m. carlson
2020-06-19 22:39 ` [PATCH 12/14] git-cvsserver: port to SHA-256 brian m. carlson
2020-06-19 22:39 ` [PATCH 13/14] git-cvsimport: " brian m. carlson
2020-06-19 22:39 ` [PATCH 14/14] git-cvsexportcommit: " brian m. carlson
2020-06-20  0:21 ` [PATCH 00/14] SHA-256 CVS and SVN patches Eric Wong
2020-06-22 16:50 ` Junio C Hamano
2020-06-22 17:46   ` brian m. carlson
2020-06-22 18:04 ` [PATCH v2 " brian m. carlson
2020-06-22 18:04   ` [PATCH v2 01/14] t9109: make test hash independent brian m. carlson
2020-06-22 18:04   ` [PATCH v2 02/14] t9168: " brian m. carlson
2020-06-22 18:04   ` [PATCH v2 03/14] t9108: " brian m. carlson
2020-06-22 18:04   ` [PATCH v2 04/14] t9100: make test work with SHA-256 brian m. carlson
2020-06-22 18:04   ` [PATCH v2 05/14] t9104: make hash size independent brian m. carlson
2020-06-22 18:04   ` [PATCH v2 06/14] t9101: make hash independent brian m. carlson
2020-06-22 18:04   ` [PATCH v2 07/14] t/lib-git-svn: make hash size independent brian m. carlson
2020-06-22 18:04   ` [PATCH v2 08/14] perl: create and switch variables for hash constants brian m. carlson
2020-06-22 18:04   ` [PATCH v2 09/14] perl: make Git::IndexInfo work with SHA-256 brian m. carlson
2020-06-22 18:04   ` [PATCH v2 10/14] perl: make SVN code hash independent brian m. carlson
2020-06-22 18:04   ` [PATCH v2 11/14] git-svn: set the OID length based on hash algorithm brian m. carlson
2020-06-22 18:04   ` [PATCH v2 12/14] git-cvsserver: port to SHA-256 brian m. carlson
2020-06-22 18:04   ` [PATCH v2 13/14] git-cvsimport: " brian m. carlson
2020-06-22 18:04   ` [PATCH v2 14/14] git-cvsexportcommit: " brian m. carlson
2020-08-03 18:37     ` Andreas Schwab
2020-08-03 23:50       ` brian m. carlson
2020-08-04  0:13         ` Eric Wong
2020-08-04  0:44           ` brian m. carlson
2020-08-05 17:29         ` Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200619223947.947067-5-sandals@crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=e@80x24.org \
    --cc=git@matthieu-moy.fr \
    --cc=git@vger.kernel.org \
    --cc=matvore@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).