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

[PATCH v2 03/14] t3301: abstract away SHA-1-specific constants

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Aug 26, 2019, 01:43 UTC
Message-ID
<20190826014344.16008-4-sandals@crustytoothpaste.net>
In-Reply-To
<20190826014344.16008-1-sandals@crustytoothpaste.net>

Adjust the test so that it computes variables for object IDs instead of using hard-coded hashes. Move some invocations of test_commit around so that we can compute the object IDs for these commits.

Compute several object IDs in the tests instead of using hard-coded values so that the test works with any hash algorithm. Since the actual values are sorted by the object ID of the object being annotated, sort the expected values accordingly as well.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
---
 t/t3301-notes.sh | 140 ++++++++++++++++++++++++++++++-----------------
 1 file changed, 90 insertions(+), 50 deletions(-)
diff --git a/t/t3301-notes.sh b/t/t3301-notes.sh
index 704bbc6541..d3fa298c6a 100755
--- a/t/t3301-notes.sh
+++ b/t/t3301-notes.sh
@@ -66,8 +66,9 @@ test_expect_success 'show notes entry with %N' '
 '
 
 test_expect_success 'create reflog entry' '
+	ref=$(git rev-parse --short refs/notes/commits) &&
 	cat <<-EOF >expect &&
-		a1d8fa6 refs/notes/commits@{0}: notes: Notes added by '\''git notes add'\''
+		$ref refs/notes/commits@{0}: notes: Notes added by '\''git notes add'\''
 	EOF
 	git reflog show refs/notes/commits >actual &&
 	test_cmp expect actual
@@ -134,8 +135,9 @@ test_expect_success 'can overwrite existing note with "git notes add -f"' '
 '
 
 test_expect_success 'show notes' '
+	commit=$(git rev-parse HEAD) &&
 	cat >expect <<-EOF &&
-		commit 7a4ca6ee52a974a66cbaa78e33214535dff1d691
+		commit $commit
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:14:13 2005 -0700
 
@@ -152,8 +154,9 @@ test_expect_success 'show notes' '
 test_expect_success 'show multi-line notes' '
 	test_commit 3rd &&
 	MSG="b3${LF}c3c3c3c3${LF}d3d3d3" git notes add &&
+	commit=$(git rev-parse HEAD) &&
 	cat >expect-multiline <<-EOF &&
-		commit d07d62e5208f22eb5695e7eb47667dc8b9860290
+		commit $commit
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:15:13 2005 -0700
 
@@ -174,8 +177,9 @@ test_expect_success 'show -F notes' '
 	test_commit 4th &&
 	echo "xyzzy" >note5 &&
 	git notes add -F note5 &&
+	commit=$(git rev-parse HEAD) &&
 	cat >expect-F <<-EOF &&
-		commit 0f7aa3ec6325aeb88b910453bb3eb37c49d75c11
+		commit $commit
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:16:13 2005 -0700
 
@@ -198,10 +202,13 @@ test_expect_success 'Re-adding -F notes without -f fails' '
 '
 
 test_expect_success 'git log --pretty=raw does not show notes' '
+	commit=$(git rev-parse HEAD) &&
+	tree=$(git rev-parse HEAD^{tree}) &&
+	parent=$(git rev-parse HEAD^) &&
 	cat >expect <<-EOF &&
-		commit 0f7aa3ec6325aeb88b910453bb3eb37c49d75c11
-		tree 05ac65288c4c4b3b709a020ae94b2ece2f2201ae
-		parent d07d62e5208f22eb5695e7eb47667dc8b9860290
+		commit $commit
+		tree $tree
+		parent $parent
 		author A U Thor <author@example.com> 1112912173 -0700
 		committer C O Mitter <committer@example.com> 1112912173 -0700
 
@@ -291,8 +298,9 @@ test_expect_success 'git log --no-notes resets ref list' '
 test_expect_success 'show -m notes' '
 	test_commit 5th &&
 	git notes add -m spam -m "foo${LF}bar${LF}baz" &&
+	commit=$(git rev-parse HEAD) &&
 	cat >expect-m <<-EOF &&
-		commit 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
+		commit $commit
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:17:13 2005 -0700
 
@@ -313,8 +321,9 @@ test_expect_success 'show -m notes' '
 
 test_expect_success 'remove note with add -f -F /dev/null' '
 	git notes add -f -F /dev/null &&
+	commit=$(git rev-parse HEAD) &&
 	cat >expect-rm-F <<-EOF &&
-		commit 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
+		commit $commit
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:17:13 2005 -0700
 
@@ -356,14 +365,16 @@ test_expect_success 'create note with combination of -m and -F' '
 test_expect_success 'remove note with "git notes remove"' '
 	git notes remove HEAD^ &&
 	git notes remove &&
+	commit=$(git rev-parse HEAD) &&
+	parent=$(git rev-parse HEAD^) &&
 	cat >expect-rm-remove <<-EOF &&
-		commit 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
+		commit $commit
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:17:13 2005 -0700
 
 		${indent}5th
 
-		commit 0f7aa3ec6325aeb88b910453bb3eb37c49d75c11
+		commit $parent
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:16:13 2005 -0700
 
@@ -459,9 +470,11 @@ test_expect_success 'removing with --stdin --ignore-missing' '
 '
 
 test_expect_success 'list notes with "git notes list"' '
-	cat >expect <<-EOF &&
-		c9c6af7f78bc47490dbf3e822cf2f3c24d4b9061 7a4ca6ee52a974a66cbaa78e33214535dff1d691
-		c18dc024e14f08d18d14eea0d747ff692d66d6a3 d07d62e5208f22eb5695e7eb47667dc8b9860290
+	commit_2=$(git rev-parse 2nd) &&
+	commit_3=$(git rev-parse 3rd) &&
+	sort -t" " -k2 >expect <<-EOF &&
+		$(git rev-parse refs/notes/commits:$commit_2) $commit_2
+		$(git rev-parse refs/notes/commits:$commit_3) $commit_3
 	EOF
 	git notes list >actual &&
 	test_cmp expect actual
@@ -474,7 +487,7 @@ test_expect_success 'list notes with "git notes"' '
 
 test_expect_success 'list specific note with "git notes list <object>"' '
 	cat >expect <<-EOF &&
-		c18dc024e14f08d18d14eea0d747ff692d66d6a3
+		$(git rev-parse refs/notes/commits:$commit_3)
 	EOF
 	git notes list HEAD^^ >actual &&
 	test_cmp expect actual
@@ -498,10 +511,11 @@ test_expect_success 'append to existing note with "git notes append"' '
 '
 
 test_expect_success '"git notes list" does not expand to "git notes list HEAD"' '
-	cat >expect_list <<-EOF &&
-		c9c6af7f78bc47490dbf3e822cf2f3c24d4b9061 7a4ca6ee52a974a66cbaa78e33214535dff1d691
-		4b6ad22357cc8a1296720574b8d2fbc22fab0671 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
-		c18dc024e14f08d18d14eea0d747ff692d66d6a3 d07d62e5208f22eb5695e7eb47667dc8b9860290
+	commit_5=$(git rev-parse 5th) &&
+	sort -t" " -k2 >expect_list <<-EOF &&
+		$(git rev-parse refs/notes/commits:$commit_2) $commit_2
+		$(git rev-parse refs/notes/commits:$commit_3) $commit_3
+		$(git rev-parse refs/notes/commits:$commit_5) $commit_5
 	EOF
 	git notes list >actual &&
 	test_cmp expect_list actual
@@ -531,8 +545,9 @@ test_expect_success 'appending empty string to non-existing note does not create
 test_expect_success 'create other note on a different notes ref (setup)' '
 	test_commit 6th &&
 	GIT_NOTES_REF="refs/notes/other" git notes add -m "other note" &&
+	commit=$(git rev-parse HEAD) &&
 	cat >expect-not-other <<-EOF &&
-		commit 2c125331118caba0ff8238b7f4958ac6e93fe39c
+		commit $commit
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:18:13 2005 -0700
 
@@ -569,8 +584,10 @@ test_expect_success 'Do not show note when core.notesRef is overridden' '
 '
 
 test_expect_success 'Show all notes when notes.displayRef=refs/notes/*' '
+	commit=$(git rev-parse HEAD) &&
+	parent=$(git rev-parse HEAD^) &&
 	cat >expect-both <<-EOF &&
-		commit 2c125331118caba0ff8238b7f4958ac6e93fe39c
+		commit $commit
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:18:13 2005 -0700
 
@@ -582,7 +599,7 @@ test_expect_success 'Show all notes when notes.displayRef=refs/notes/*' '
 		Notes (other):
 		${indent}other note
 
-		commit 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
+		commit $parent
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:17:13 2005 -0700
 
@@ -616,8 +633,9 @@ test_expect_success 'notes.displayRef can be given more than once' '
 '
 
 test_expect_success 'notes.displayRef respects order' '
+	commit=$(git rev-parse HEAD) &&
 	cat >expect-both-reversed <<-EOF &&
-		commit 2c125331118caba0ff8238b7f4958ac6e93fe39c
+		commit $commit
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:18:13 2005 -0700
 
@@ -642,14 +660,16 @@ test_expect_success 'GIT_NOTES_DISPLAY_REF works' '
 '
 
 test_expect_success 'GIT_NOTES_DISPLAY_REF overrides config' '
+	commit=$(git rev-parse HEAD) &&
+	parent=$(git rev-parse HEAD^) &&
 	cat >expect-none <<-EOF &&
-		commit 2c125331118caba0ff8238b7f4958ac6e93fe39c
+		commit $commit
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:18:13 2005 -0700
 
 		${indent}6th
 
-		commit 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
+		commit $parent
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:17:13 2005 -0700
 
@@ -666,8 +686,9 @@ test_expect_success '--show-notes=* adds to GIT_NOTES_DISPLAY_REF' '
 '
 
 test_expect_success '--no-standard-notes' '
+	commit=$(git rev-parse HEAD) &&
 	cat >expect-commits <<-EOF &&
-		commit 2c125331118caba0ff8238b7f4958ac6e93fe39c
+		commit $commit
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:18:13 2005 -0700
 
@@ -712,8 +733,10 @@ test_expect_success 'Allow notes on non-commits (trees, blobs, tags)' '
 '
 
 test_expect_success 'create note from other note with "git notes add -C"' '
+	test_commit 7th &&
+	commit=$(git rev-parse HEAD) &&
 	cat >expect <<-EOF &&
-		commit fb01e0ca8c33b6cc0c6451dde747f97df567cb5c
+		commit $commit
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:19:13 2005 -0700
 
@@ -722,7 +745,6 @@ test_expect_success 'create note from other note with "git notes add -C"' '
 		Notes:
 		${indent}order test
 	EOF
-	test_commit 7th &&
 	git notes add -C $(git notes list HEAD^) &&
 	git log -1 >actual &&
 	test_cmp expect actual &&
@@ -744,8 +766,9 @@ test_expect_success 'create note from non-blob with "git notes add -C" fails' '
 '
 
 test_expect_success 'create note from blob with "git notes add -C" reuses blob id' '
+	commit=$(git rev-parse HEAD) &&
 	cat >expect <<-EOF &&
-		commit 9a4c31c7f722b5d517e92c64e932dd751e1413bf
+		commit $commit
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:20:13 2005 -0700
 
@@ -762,8 +785,10 @@ test_expect_success 'create note from blob with "git notes add -C" reuses blob i
 '
 
 test_expect_success 'create note from other note with "git notes add -c"' '
+	test_commit 9th &&
+	commit=$(git rev-parse HEAD) &&
 	cat >expect <<-EOF &&
-		commit 2e0db4bc649e174d667a1cde19e725cf897a5bd2
+		commit $commit
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:21:13 2005 -0700
 
@@ -772,7 +797,6 @@ test_expect_success 'create note from other note with "git notes add -c"' '
 		Notes:
 		${indent}yet another note
 	EOF
-	test_commit 9th &&
 	MSG="yet another note" git notes add -c $(git notes list HEAD^^) &&
 	git log -1 >actual &&
 	test_cmp expect actual
@@ -785,8 +809,9 @@ test_expect_success 'create note from non-existing note with "git notes add -c"
 '
 
 test_expect_success 'append to note from other note with "git notes append -C"' '
+	commit=$(git rev-parse HEAD^) &&
 	cat >expect <<-EOF &&
-		commit 2e0db4bc649e174d667a1cde19e725cf897a5bd2
+		commit $commit
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:21:13 2005 -0700
 
@@ -803,8 +828,9 @@ test_expect_success 'append to note from other note with "git notes append -C"'
 '
 
 test_expect_success 'create note from other note with "git notes append -c"' '
+	commit=$(git rev-parse HEAD) &&
 	cat >expect <<-EOF &&
-		commit 7c3b87ab368f81e11b1ea87b2ab99a71ccd25406
+		commit $commit
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:22:13 2005 -0700
 
@@ -819,8 +845,9 @@ test_expect_success 'create note from other note with "git notes append -c"' '
 '
 
 test_expect_success 'append to note from other note with "git notes append -c"' '
+	commit=$(git rev-parse HEAD) &&
 	cat >expect <<-EOF &&
-		commit 7c3b87ab368f81e11b1ea87b2ab99a71ccd25406
+		commit $commit
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:22:13 2005 -0700
 
@@ -837,8 +864,10 @@ test_expect_success 'append to note from other note with "git notes append -c"'
 '
 
 test_expect_success 'copy note with "git notes copy"' '
+	test_commit 11th &&
+	commit=$(git rev-parse HEAD) &&
 	cat >expect <<-EOF &&
-		commit a446fff8777efdc6eb8f4b7c8a5ff699484df0d5
+		commit $commit
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:23:13 2005 -0700
 
@@ -849,7 +878,6 @@ test_expect_success 'copy note with "git notes copy"' '
 		${indent}
 		${indent}yet another note
 	EOF
-	test_commit 11th &&
 	git notes copy HEAD^ HEAD &&
 	git log -1 >actual &&
 	test_cmp expect actual &&
@@ -864,8 +892,9 @@ test_expect_success 'prevent overwrite with "git notes copy"' '
 '
 
 test_expect_success 'allow overwrite with "git notes copy -f"' '
+	commit=$(git rev-parse HEAD) &&
 	cat >expect <<-EOF &&
-		commit a446fff8777efdc6eb8f4b7c8a5ff699484df0d5
+		commit $commit
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:23:13 2005 -0700
 
@@ -889,8 +918,10 @@ test_expect_success 'cannot copy note from object without notes' '
 '
 
 test_expect_success 'git notes copy --stdin' '
+	commit=$(git rev-parse HEAD) &&
+	parent=$(git rev-parse HEAD^) &&
 	cat >expect <<-EOF &&
-		commit e871aa61182b1d95d0a6fb75445d891722863b6b
+		commit $commit
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:25:13 2005 -0700
 
@@ -901,7 +932,7 @@ test_expect_success 'git notes copy --stdin' '
 		${indent}
 		${indent}yet another note
 
-		commit 65e263ded02ae4e8839bc151095113737579dc12
+		commit $parent
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:24:13 2005 -0700
 
@@ -922,21 +953,23 @@ test_expect_success 'git notes copy --stdin' '
 '
 
 test_expect_success 'git notes copy --for-rewrite (unconfigured)' '
+	test_commit 14th &&
+	test_commit 15th &&
+	commit=$(git rev-parse HEAD) &&
+	parent=$(git rev-parse HEAD^) &&
 	cat >expect <<-EOF &&
-		commit 4acf42e847e7fffbbf89ee365c20ac7caf40de89
+		commit $commit
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:27:13 2005 -0700
 
 		${indent}15th
 
-		commit 07c85d77059393ed0154b8c96906547a59dfcddd
+		commit $parent
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:26:13 2005 -0700
 
 		${indent}14th
 	EOF
-	test_commit 14th &&
-	test_commit 15th &&
 	(echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^) &&
 	echo $(git rev-parse HEAD~2) $(git rev-parse HEAD)) |
 	git notes copy --for-rewrite=foo &&
@@ -945,8 +978,10 @@ test_expect_success 'git notes copy --for-rewrite (unconfigured)' '
 '
 
 test_expect_success 'git notes copy --for-rewrite (enabled)' '
+	commit=$(git rev-parse HEAD) &&
+	parent=$(git rev-parse HEAD^) &&
 	cat >expect <<-EOF &&
-		commit 4acf42e847e7fffbbf89ee365c20ac7caf40de89
+		commit $commit
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:27:13 2005 -0700
 
@@ -957,7 +992,7 @@ test_expect_success 'git notes copy --for-rewrite (enabled)' '
 		${indent}
 		${indent}yet another note
 
-		commit 07c85d77059393ed0154b8c96906547a59dfcddd
+		commit $parent
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:26:13 2005 -0700
 
@@ -986,8 +1021,9 @@ test_expect_success 'git notes copy --for-rewrite (disabled)' '
 '
 
 test_expect_success 'git notes copy --for-rewrite (overwrite)' '
+	commit=$(git rev-parse HEAD) &&
 	cat >expect <<-EOF &&
-		commit 4acf42e847e7fffbbf89ee365c20ac7caf40de89
+		commit $commit
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:27:13 2005 -0700
 
@@ -1015,8 +1051,9 @@ test_expect_success 'git notes copy --for-rewrite (ignore)' '
 '
 
 test_expect_success 'git notes copy --for-rewrite (append)' '
+	commit=$(git rev-parse HEAD) &&
 	cat >expect <<-EOF &&
-		commit 4acf42e847e7fffbbf89ee365c20ac7caf40de89
+		commit $commit
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:27:13 2005 -0700
 
@@ -1037,8 +1074,9 @@ test_expect_success 'git notes copy --for-rewrite (append)' '
 '
 
 test_expect_success 'git notes copy --for-rewrite (append two to one)' '
+	commit=$(git rev-parse HEAD) &&
 	cat >expect <<-EOF &&
-		commit 4acf42e847e7fffbbf89ee365c20ac7caf40de89
+		commit $commit
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:27:13 2005 -0700
 
@@ -1075,8 +1113,9 @@ test_expect_success 'git notes copy --for-rewrite (append empty)' '
 '
 
 test_expect_success 'GIT_NOTES_REWRITE_MODE works' '
+	commit=$(git rev-parse HEAD) &&
 	cat >expect <<-EOF &&
-		commit 4acf42e847e7fffbbf89ee365c20ac7caf40de89
+		commit $commit
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:27:13 2005 -0700
 
@@ -1095,8 +1134,9 @@ test_expect_success 'GIT_NOTES_REWRITE_MODE works' '
 '
 
 test_expect_success 'GIT_NOTES_REWRITE_REF works' '
+	commit=$(git rev-parse HEAD) &&
 	cat >expect <<-EOF &&
-		commit 4acf42e847e7fffbbf89ee365c20ac7caf40de89
+		commit $commit
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:27:13 2005 -0700
 
Previous: brian m. carlsonNext: brian m. carlson
Message 22 of 229 in “Hash-independent tests, part 5”
  1. 00/14 Hash-independent tests, part 5brian m. carlson, Aug 18, 2019
  2. 01/14 t3201: abstract away SHA-1-specific constantsbrian m. carlson, Aug 18, 2019
  3. 02/14 t3206: abstract away hash size constantsbrian m. carlson, Aug 18, 2019
  4. 04/14 t3305: make hash size independentbrian m. carlson, Aug 18, 2019
  5. 03/14 t3301: abstract away SHA-1-specific constantsbrian m. carlson, Aug 18, 2019
  6. 05/14 t3306: abstract away SHA-1-specific constantsbrian m. carlson, Aug 18, 2019
  7. 06/14 t3404: abstract away SHA-1-specific constantsbrian m. carlson, Aug 18, 2019
  8. 07/14 t3430: avoid hard-coded object IDsbrian m. carlson, Aug 18, 2019
  9. 08/14 t3506: make hash independentbrian m. carlson, Aug 18, 2019
  10. 10/14 t3800: make hash-size independentbrian m. carlson, Aug 18, 2019
  11. 11/14 t3903: abstract away SHA-1-specific constantsbrian m. carlson, Aug 18, 2019
  12. Eric SunshineAug 18, 2019
  13. brian m. carlsonAug 18, 2019
  14. 12/14 t4000: make hash size independentbrian m. carlson, Aug 18, 2019
  15. 13/14 t4002: make hash independentbrian m. carlson, Aug 18, 2019
  16. Eric SunshineAug 18, 2019
  17. 14/14 t4009: make hash size independentbrian m. carlson, Aug 18, 2019
  18. 09/14 t3600: make hash size independentbrian m. carlson, Aug 18, 2019
  19. 00/14 Hash-independent tests, part 5brian m. carlson, Aug 26, 2019
  20. 01/14 t3201: abstract away SHA-1-specific constantsbrian m. carlson, Aug 26, 2019
  21. 04/14 t3305: make hash size independentbrian m. carlson, Aug 26, 2019
  22. 03/14 t3301: abstract away SHA-1-specific constantsbrian m. carlson, Aug 26, 2019
  23. 02/14 t3206: abstract away hash size constantsbrian m. carlson, Aug 26, 2019
  24. 07/14 t3430: avoid hard-coded object IDsbrian m. carlson, Aug 26, 2019
  25. 05/14 t3306: abstract away SHA-1-specific constantsbrian m. carlson, Aug 26, 2019
  26. 08/14 t3506: make hash independentbrian m. carlson, Aug 26, 2019
  27. 06/14 t3404: abstract away SHA-1-specific constantsbrian m. carlson, Aug 26, 2019
  28. 09/14 t3600: make hash size independentbrian m. carlson, Aug 26, 2019
  29. 10/14 t3800: make hash-size independentbrian m. carlson, Aug 26, 2019
  30. mktag: don't check SHA-1 object length under SHA-256Ævar Arnfjörð Bjarmason, Nov 23, 2020
  31. Junio C HamanoNov 23, 2020
  32. Jeff KingNov 23, 2020
  33. Junio C HamanoNov 23, 2020
  34. Jeff KingNov 24, 2020
  35. Jeff KingNov 23, 2020
  36. brian m. carlsonNov 24, 2020
  37. 01/12 mktag: use default strbuf_read() hintÆvar Arnfjörð Bjarmason, Nov 26, 2020
  38. 00/12 make "mktag" use fsck_tag()Ævar Arnfjörð Bjarmason, Nov 26, 2020
  39. 02/10 mktag: use default strbuf_read() hintÆvar Arnfjörð Bjarmason, Nov 26, 2020
  40. Junio C HamanoDec 1, 2020
  41. 04/10 mktag: remove redundant braces in one-line body "if"Ævar Arnfjörð Bjarmason, Nov 26, 2020
  42. 03/10 mktag: reword write_object_file() errorÆvar Arnfjörð Bjarmason, Nov 26, 2020
  43. Junio C HamanoDec 1, 2020
  44. Junio C HamanoDec 1, 2020
  45. 00/10 make "mktag" use fsck_tag()Ævar Arnfjörð Bjarmason, Nov 26, 2020
  46. Ævar Arnfjörð BjarmasonDec 1, 2020
  47. Junio C HamanoDec 1, 2020
  48. Junio C HamanoDec 2, 2020
  49. Ævar Arnfjörð BjarmasonDec 3, 2020
  50. 02/10 mktag: use default strbuf_read() hintÆvar Arnfjörð Bjarmason, Dec 9, 2020
  51. 01/10 mktag doc: say <hash> not <sha1>Ævar Arnfjörð Bjarmason, Dec 9, 2020
  52. 03/10 mktag: remove redundant braces in one-line body "if"Ævar Arnfjörð Bjarmason, Dec 9, 2020
  53. 06/10 mktag tests: improve verify_object() test coverageÆvar Arnfjörð Bjarmason, Dec 9, 2020
  54. 10/10 mktag: allow turning off fsck.extraHeaderEntryÆvar Arnfjörð Bjarmason, Dec 9, 2020
  55. 08/10 mktag doc: update to explain why to use thisÆvar Arnfjörð Bjarmason, Dec 9, 2020
  56. 09/10 fsck: make fsck_config() re-usableÆvar Arnfjörð Bjarmason, Dec 9, 2020
  57. 07/10 mktag: use fsck instead of custom verify_tag()Ævar Arnfjörð Bjarmason, Dec 9, 2020
  58. 00/10 make "mktag" use fsck_tag()Ævar Arnfjörð Bjarmason, Dec 9, 2020
  59. Junio C HamanoDec 9, 2020
  60. 01/20 mktag doc: say <hash> not <sha1>Ævar Arnfjörð Bjarmason, Dec 23, 2020
  61. 00/20 make "mktag" use fsck_tag() & moreÆvar Arnfjörð Bjarmason, Dec 23, 2020
  62. Junio C HamanoDec 23, 2020
  63. Junio C HamanoDec 24, 2020
  64. 00/23 make "mktag" use fsck_tag() & moreÆvar Arnfjörð Bjarmason, Jan 5, 2021
  65. 01/23 mktag doc: say <hash> not <sha1>Ævar Arnfjörð Bjarmason, Jan 5, 2021
  66. 03/23 mktag doc: update to explain why to use thisÆvar Arnfjörð Bjarmason, Jan 5, 2021
  67. 04/23 mktag tests: don't needlessly use a subshellÆvar Arnfjörð Bjarmason, Jan 5, 2021
  68. 02/23 mktag doc: grammar fix, when exists -> when it existsÆvar Arnfjörð Bjarmason, Jan 5, 2021
  69. 06/23 mktag tests: remove needless SHA-1 hardcodingÆvar Arnfjörð Bjarmason, Jan 5, 2021
  70. 05/23 mktag tests: use "test_commit" helperÆvar Arnfjörð Bjarmason, Jan 5, 2021
  71. 07/23 mktag tests: don't redirect stderr to a file needlesslyÆvar Arnfjörð Bjarmason, Jan 5, 2021
  72. 08/23 mktag tests: don't create "mytag" twiceÆvar Arnfjörð Bjarmason, Jan 5, 2021
  73. 11/23 mktag tests: test "hash-object" compatibilityÆvar Arnfjörð Bjarmason, Jan 5, 2021
  74. 13/23 mktag tests: test verify_object() with replaced objectsÆvar Arnfjörð Bjarmason, Jan 5, 2021
  75. 12/23 mktag tests: improve verify_object() test coverageÆvar Arnfjörð Bjarmason, Jan 5, 2021
  76. SZEDER GáborJan 10, 2021
  77. Should you use test_i18ngrep or GIT_TEST_GETTEXT_POISON=false?Ævar Arnfjörð Bjarmason, Jan 10, 2021
  78. Junio C HamanoJan 10, 2021
  79. Ævar Arnfjörð BjarmasonJan 11, 2021
  80. 0/2 Makefile & gettext.c: remove warning & long commentÆvar Arnfjörð Bjarmason, Jan 11, 2021
  81. Junio C HamanoJan 11, 2021
  82. 2/2 gettext.c: remove/reword a mostly-useless commentÆvar Arnfjörð Bjarmason, Jan 11, 2021
  83. 1/2 Makefile: remove a warning about old GETTEXT_POISON flagÆvar Arnfjörð Bjarmason, Jan 11, 2021
  84. 2/6 tests: remove support for GIT_TEST_GETTEXT_POISONÆvar Arnfjörð Bjarmason, Jan 11, 2021
  85. Junio C HamanoJan 11, 2021
  86. config.c: remove last remnant of GIT_TEST_GETTEXT_POISONÆvar Arnfjörð Bjarmason, Mar 24, 2021
  87. Jeff KingMar 25, 2021
  88. Ævar Arnfjörð BjarmasonMar 25, 2021
  89. Junio C HamanoMar 25, 2021
  90. config.c: remove last remnant of GIT_TEST_GETTEXT_POISONÆvar Arnfjörð Bjarmason, Apr 8, 2021
  91. Junio C HamanoApr 8, 2021
  92. 0/6 Remove GIT_TEST_GETTEXT_POISON facilityÆvar Arnfjörð Bjarmason, Jan 11, 2021
  93. SZEDER GáborJan 20, 2021
  94. Ævar Arnfjörð BjarmasonJan 20, 2021
  95. 3/3 tests: remove uses of GIT_TEST_GETTEXT_POISON=falseÆvar Arnfjörð Bjarmason, Jan 20, 2021
  96. 2/3 tests: remove support for GIT_TEST_GETTEXT_POISONÆvar Arnfjörð Bjarmason, Jan 20, 2021
  97. 0/3 Remove GIT_TEST_GETTEXT_POISON facilityÆvar Arnfjörð Bjarmason, Jan 20, 2021
  98. 1/4 tests: remove last uses of GIT_TEST_GETTEXT_POISON=falseÆvar Arnfjörð Bjarmason, Feb 11, 2021
  99. mktag tests: fix broken "&&" chainÆvar Arnfjörð Bjarmason, Mar 7, 2021
  100. SZEDER GáborMar 7, 2021
  101. Junio C HamanoMar 7, 2021
  102. Eric SunshineMar 7, 2021
  103. mktag tests: fix broken "&&" chainÆvar Arnfjörð Bjarmason, Mar 24, 2021
  104. Junio C HamanoMar 24, 2021
  105. 3/4 tests: remove last uses of C_LOCALE_OUTPUTÆvar Arnfjörð Bjarmason, Feb 11, 2021
  106. 0/4 More GETTEXT_POISON removalÆvar Arnfjörð Bjarmason, Feb 11, 2021
  107. 2/4 tests: remove most uses of C_LOCALE_OUTPUTÆvar Arnfjörð Bjarmason, Feb 11, 2021
  108. 4/4 tests: remove most uses of test_i18ncmpÆvar Arnfjörð Bjarmason, Feb 11, 2021
  109. Junio C HamanoFeb 11, 2021
  110. Ævar Arnfjörð BjarmasonFeb 13, 2021
  111. Jonathan NiederFeb 19, 2021
  112. tests: remove all uses of test_i18cmpÆvar Arnfjörð Bjarmason, Apr 13, 2021
  113. 0/2 diff tests: un-flaky and post-gettext-poison cleanupÆvar Arnfjörð Bjarmason, Apr 13, 2021
  114. 2/2 diff tests: rewrite flakyness-causing test "aid"Ævar Arnfjörð Bjarmason, Apr 13, 2021
  115. Matheus Tavares BernardinoApr 13, 2021
  116. Ævar Arnfjörð BjarmasonApr 13, 2021
  117. Matheus Tavares BernardinoApr 13, 2021
  118. Junio C HamanoApr 13, 2021
  119. Ævar Arnfjörð BjarmasonApr 14, 2021
  120. Junio C HamanoApr 14, 2021
  121. Ævar Arnfjörð BjarmasonApr 14, 2021
  122. Junio C HamanoApr 14, 2021
  123. Ævar Arnfjörð BjarmasonApr 14, 2021
  124. Junio C HamanoApr 15, 2021
  125. Ævar Arnfjörð BjarmasonApr 15, 2021
  126. Junio C HamanoApr 16, 2021
  127. SZEDER GáborApr 15, 2021
  128. 1/2 diff tests: remove redundant case statementÆvar Arnfjörð Bjarmason, Apr 13, 2021
  129. Matheus Tavares BernardinoApr 13, 2021
  130. Ævar Arnfjörð BjarmasonApr 13, 2021
  131. Junio C HamanoApr 13, 2021
  132. 1/3 ci: remove GETTEXT_POISON jobsÆvar Arnfjörð Bjarmason, Jan 20, 2021
  133. 1/6 ci: remove GETTEXT_POISON jobsÆvar Arnfjörð Bjarmason, Jan 11, 2021
  134. SZEDER GáborJan 12, 2021
  135. Ævar Arnfjörð BjarmasonJan 20, 2021
  136. SZEDER GáborJan 20, 2021
  137. Ævar Arnfjörð BjarmasonJan 27, 2021
  138. SZEDER GáborFeb 1, 2021
  139. Ævar Arnfjörð BjarmasonFeb 3, 2021
  140. SZEDER GáborFeb 3, 2021
  141. 3/6 tests: remove misc use of test_i18n{cmp,grep}Ævar Arnfjörð Bjarmason, Jan 11, 2021
  142. 6/6 tests: remove uses of GIT_TEST_GETTEXT_POISON=falseÆvar Arnfjörð Bjarmason, Jan 11, 2021
  143. 4/6 tests: (almost) remove use of "test_i18ngrep !"Ævar Arnfjörð Bjarmason, Jan 11, 2021
  144. 5/6 tests: (almost) remove C_LOCALE_OUTPUT prerequisitesÆvar Arnfjörð Bjarmason, Jan 11, 2021
  145. Junio C HamanoJan 11, 2021
  146. Jeff KingJan 12, 2021
  147. SZEDER GáborJan 20, 2021
  148. 09/23 mktag tests: run "fsck" after creating "mytag"Ævar Arnfjörð Bjarmason, Jan 5, 2021
  149. 10/23 mktag tests: stress test whitespace handlingÆvar Arnfjörð Bjarmason, Jan 5, 2021
  150. 14/23 mktag: use default strbuf_read() hintÆvar Arnfjörð Bjarmason, Jan 5, 2021
  151. 15/23 mktag: remove redundant braces in one-line body "if"Ævar Arnfjörð Bjarmason, Jan 5, 2021
  152. 16/23 mktag: use puts(str) instead of printf("%s\n", str)Ævar Arnfjörð Bjarmason, Jan 5, 2021
  153. 21/23 mktag: convert to parse-optionsÆvar Arnfjörð Bjarmason, Jan 5, 2021
  154. 19/23 mktag: allow turning off fsck.extraHeaderEntryÆvar Arnfjörð Bjarmason, Jan 5, 2021
  155. 23/23 mktag: add a --no-strict optionÆvar Arnfjörð Bjarmason, Jan 5, 2021
  156. Junio C HamanoJan 6, 2021
  157. 23/23 mktag: add a --[no-]strict optionÆvar Arnfjörð Bjarmason, Jan 6, 2021
  158. Junio C HamanoJan 6, 2021
  159. Ævar Arnfjörð BjarmasonJan 7, 2021
  160. 22/23 mktag: mark strings for translationÆvar Arnfjörð Bjarmason, Jan 5, 2021
  161. 20/23 mktag: allow omitting the header/body \n separatorÆvar Arnfjörð Bjarmason, Jan 5, 2021
  162. 17/23 mktag: use fsck instead of custom verify_tag()Ævar Arnfjörð Bjarmason, Jan 5, 2021
  163. 18/23 fsck: make fsck_config() re-usableÆvar Arnfjörð Bjarmason, Jan 5, 2021
  164. 02/20 mktag doc: grammar fix, when exists -> when it existsÆvar Arnfjörð Bjarmason, Dec 23, 2020
  165. 03/20 mktag doc: update to explain why to use thisÆvar Arnfjörð Bjarmason, Dec 23, 2020
  166. Junio C HamanoDec 23, 2020
  167. 05/20 mktag tests: remove needless SHA-1 hardcodingÆvar Arnfjörð Bjarmason, Dec 23, 2020
  168. 04/20 mktag tests: don't needlessly use a subshellÆvar Arnfjörð Bjarmason, Dec 23, 2020
  169. 16/20 mktag: allow turning off fsck.extraHeaderEntryÆvar Arnfjörð Bjarmason, Dec 23, 2020
  170. SZEDER GáborDec 23, 2020
  171. 14/20 mktag: use fsck instead of custom verify_tag()Ævar Arnfjörð Bjarmason, Dec 23, 2020
  172. Junio C HamanoDec 23, 2020
  173. 20/20 mktag: add a --no-strict optionÆvar Arnfjörð Bjarmason, Dec 23, 2020
  174. Junio C HamanoDec 23, 2020
  175. SZEDER GáborDec 23, 2020
  176. 18/20 mktag: convert to parse-optionsÆvar Arnfjörð Bjarmason, Dec 23, 2020
  177. 06/20 mktag tests: improve verify_object() test coverageÆvar Arnfjörð Bjarmason, Dec 23, 2020
  178. Junio C HamanoDec 23, 2020
  179. 11/20 mktag: use default strbuf_read() hintÆvar Arnfjörð Bjarmason, Dec 23, 2020
  180. 07/20 mktag tests: don't pipe to stderr needlesslyÆvar Arnfjörð Bjarmason, Dec 23, 2020
  181. Junio C HamanoDec 23, 2020
  182. 10/20 mktag tests: test "hash-object" compatibilityÆvar Arnfjörð Bjarmason, Dec 23, 2020
  183. Junio C HamanoDec 23, 2020
  184. 13/20 mktag: use puts(str) instead of printf("%s\n", str)Ævar Arnfjörð Bjarmason, Dec 23, 2020
  185. 17/20 mktag: allow omitting the header/body \n separatorÆvar Arnfjörð Bjarmason, Dec 23, 2020
  186. 12/20 mktag: remove redundant braces in one-line body "if"Ævar Arnfjörð Bjarmason, Dec 23, 2020
  187. 15/20 fsck: make fsck_config() re-usableÆvar Arnfjörð Bjarmason, Dec 23, 2020
  188. 09/20 mktag tests: stress test whitespace handlingÆvar Arnfjörð Bjarmason, Dec 23, 2020
  189. Junio C HamanoDec 23, 2020
  190. 08/20 mktag tests: don't create "mytag" twiceÆvar Arnfjörð Bjarmason, Dec 23, 2020
  191. Junio C HamanoDec 23, 2020
  192. 19/20 mktag: mark strings for translationÆvar Arnfjörð Bjarmason, Dec 23, 2020
  193. 04/10 mktag tests: don't needlessly use a subshellÆvar Arnfjörð Bjarmason, Dec 9, 2020
  194. 05/10 mktag tests: remove needless SHA-1 hardcodingÆvar Arnfjörð Bjarmason, Dec 9, 2020
  195. 05/10 mktag tests: don't needlessly use a subshellÆvar Arnfjörð Bjarmason, Nov 26, 2020
  196. 01/10 mktag doc: say <hash> not <sha1>Ævar Arnfjörð Bjarmason, Nov 26, 2020
  197. Junio C HamanoDec 1, 2020
  198. 07/10 mktag tests: improve verify_object() test coverageÆvar Arnfjörð Bjarmason, Nov 26, 2020
  199. 10/10 mktag doc: update to explain why to use thisÆvar Arnfjörð Bjarmason, Nov 26, 2020
  200. Junio C HamanoDec 1, 2020
  201. 06/10 mktag tests: remove needless SHA-1 hardcodingÆvar Arnfjörð Bjarmason, Nov 26, 2020
  202. Junio C HamanoDec 1, 2020
  203. 09/10 mktag: use fsck instead of custom verify_tag()Ævar Arnfjörð Bjarmason, Nov 26, 2020
  204. Junio C HamanoDec 1, 2020
  205. Junio C HamanoDec 1, 2020
  206. 08/10 fsck: add new "extra" checks for "mktag"Ævar Arnfjörð Bjarmason, Nov 26, 2020
  207. Junio C HamanoDec 1, 2020
  208. 02/12 mktag: reword write_object_file() errorÆvar Arnfjörð Bjarmason, Nov 26, 2020
  209. 03/12 mktag: remove redundant braces in one-line body "if"Ævar Arnfjörð Bjarmason, Nov 26, 2020
  210. 06/12 mktag tests: improve verify_object() test coverageÆvar Arnfjörð Bjarmason, Nov 26, 2020
  211. 04/12 mktag tests: don't needlessly use a subshellÆvar Arnfjörð Bjarmason, Nov 26, 2020
  212. 05/12 mktag tests: remove needless SHA-1 hardcodingÆvar Arnfjörð Bjarmason, Nov 26, 2020
  213. Jeff KingNov 26, 2020
  214. 08/12 mktag: use fsck instead of custom verify_tag()Ævar Arnfjörð Bjarmason, Nov 26, 2020
  215. Jeff KingNov 26, 2020
  216. Ævar Arnfjörð BjarmasonNov 26, 2020
  217. 07/12 fsck: add new "extra" checks for "mktag"Ævar Arnfjörð Bjarmason, Nov 26, 2020
  218. Jeff KingNov 26, 2020
  219. Ævar Arnfjörð BjarmasonNov 26, 2020
  220. 11/12 mktag docs: say <hash> not <sha1>Ævar Arnfjörð Bjarmason, Nov 26, 2020
  221. 09/12 mktag: remove now-unused verify_tag() codeÆvar Arnfjörð Bjarmason, Nov 26, 2020
  222. Jeff KingNov 26, 2020
  223. 12/12 mktag: bring back some of the verify_object() logicÆvar Arnfjörð Bjarmason, Nov 26, 2020
  224. Jeff KingNov 26, 2020
  225. 10/12 mktag doc: update to explain why to use thisÆvar Arnfjörð Bjarmason, Nov 26, 2020
  226. 11/14 t3903: abstract away SHA-1-specific constantsbrian m. carlson, Aug 26, 2019
  227. 12/14 t4000: make hash size independentbrian m. carlson, Aug 26, 2019
  228. 14/14 t4009: make hash size independentbrian m. carlson, Aug 26, 2019
  229. 13/14 t4002: make hash independentbrian m. carlson, Aug 26, 2019

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.