git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 04/14] t9100: make test work with SHA-256

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Jun 19, 2020, 22:39 UTC
Message-ID
<20200619223947.947067-5-sandals@crustytoothpaste.net>
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 \
Previous: brian m. carlsonNext: brian m. carlson
Message 2 of 40 in “SHA-256 CVS and SVN patches”
  1. 00/14 SHA-256 CVS and SVN patchesbrian m. carlson, Jun 19, 2020
  2. 04/14 t9100: make test work with SHA-256brian m. carlson, Jun 19, 2020
  3. 05/14 t9104: make hash size independentbrian m. carlson, Jun 19, 2020
  4. 06/14 t9101: make hash independentbrian m. carlson, Jun 19, 2020
  5. 09/14 perl: make Git::IndexInfo work with SHA-256brian m. carlson, Jun 19, 2020
  6. 07/14 t/lib-git-svn: make hash size independentbrian m. carlson, Jun 19, 2020
  7. Andreas SchwabJun 20, 2020
  8. brian m. carlsonJun 20, 2020
  9. 13/14 git-cvsimport: port to SHA-256brian m. carlson, Jun 19, 2020
  10. 11/14 git-svn: set the OID length based on hash algorithmbrian m. carlson, Jun 19, 2020
  11. 14/14 git-cvsexportcommit: port to SHA-256brian m. carlson, Jun 19, 2020
  12. 12/14 git-cvsserver: port to SHA-256brian m. carlson, Jun 19, 2020
  13. 01/14 t9109: make test hash independentbrian m. carlson, Jun 19, 2020
  14. 03/14 t9108: make test hash independentbrian m. carlson, Jun 19, 2020
  15. 02/14 t9168: make test hash independentbrian m. carlson, Jun 19, 2020
  16. 10/14 perl: make SVN code hash independentbrian m. carlson, Jun 19, 2020
  17. 08/14 perl: create and switch variables for hash constantsbrian m. carlson, Jun 19, 2020
  18. Eric WongJun 20, 2020
  19. Junio C HamanoJun 22, 2020
  20. brian m. carlsonJun 22, 2020
  21. 00/14 SHA-256 CVS and SVN patchesbrian m. carlson, Jun 22, 2020
  22. 01/14 t9109: make test hash independentbrian m. carlson, Jun 22, 2020
  23. 02/14 t9168: make test hash independentbrian m. carlson, Jun 22, 2020
  24. 08/14 perl: create and switch variables for hash constantsbrian m. carlson, Jun 22, 2020
  25. 03/14 t9108: make test hash independentbrian m. carlson, Jun 22, 2020
  26. 04/14 t9100: make test work with SHA-256brian m. carlson, Jun 22, 2020
  27. 09/14 perl: make Git::IndexInfo work with SHA-256brian m. carlson, Jun 22, 2020
  28. 07/14 t/lib-git-svn: make hash size independentbrian m. carlson, Jun 22, 2020
  29. 14/14 git-cvsexportcommit: port to SHA-256brian m. carlson, Jun 22, 2020
  30. Andreas SchwabAug 3, 2020
  31. brian m. carlsonAug 3, 2020
  32. Eric WongAug 4, 2020
  33. brian m. carlsonAug 4, 2020
  34. Andreas SchwabAug 5, 2020
  35. 11/14 git-svn: set the OID length based on hash algorithmbrian m. carlson, Jun 22, 2020
  36. 13/14 git-cvsimport: port to SHA-256brian m. carlson, Jun 22, 2020
  37. 05/14 t9104: make hash size independentbrian m. carlson, Jun 22, 2020
  38. 12/14 git-cvsserver: port to SHA-256brian m. carlson, Jun 22, 2020
  39. 06/14 t9101: make hash independentbrian m. carlson, Jun 22, 2020
  40. 10/14 perl: make SVN code hash independentbrian m. carlson, Jun 22, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.