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

[PATCH 2/4] docs: update index-pack hash algorithm for breaking changes mode

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Dec 2, 2025, 01:46 UTC
Message-ID
<20251202014605.52110-3-sandals@crustytoothpaste.net>
In-Reply-To
<20251202014605.52110-1-sandals@crustytoothpaste.net>

When compiled with WITH_BREAKING_CHANGES, the default hash algorithm switches to SHA-256, but the documentation doesn't reflect this. Update the index-pack manual page to reflect the correct algorithm in this case.

Be sure to conditionalize only full sentences to aid in localization.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
---
 Documentation/git-index-pack.adoc | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/Documentation/git-index-pack.adoc b/Documentation/git-index-pack.adoc
index 18036953c0..8f05f5494d 100644
--- a/Documentation/git-index-pack.adoc
+++ b/Documentation/git-index-pack.adoc
@@ -125,9 +125,17 @@ information on the possible values of `<msg-id>` and `<severity>`.
 
 --object-format=<hash-algorithm>::
 	Specify the given object format (hash algorithm) for the pack.  The valid
-	values are 'sha1' and (if enabled) 'sha256'.  The default is the algorithm for
-	the current repository (set by `extensions.objectFormat`), or 'sha1' if no
-	value is set or outside a repository.
+	values are 'sha1' and (if enabled) 'sha256'.
+ifndef::with-breaking-changes[]
+	The default is the algorithm for the current repository (set by
+	`extensions.objectFormat`), or 'sha1' if no value is set or outside a
+	repository.
+endif::with-breaking-changes[]
+ifdef::with-breaking-changes[]
+	The default is the algorithm for the current repository (set by
+	`extensions.objectFormat`), or 'sha256' if no value is set or outside a
+	repository.
+endif::with-breaking-changes[]
 +
 This option cannot be used with --stdin.
 +
Previous: Junio C HamanoNext: brian m. carlson
Message 5 of 8 in “Fix doc default hash algorithm in WITH_BREAKING_CHANGES mode”
  1. 0/4 Fix doc default hash algorithm in WITH_BREAKING_CHANGES modebrian m. carlson, Dec 2, 2025
  2. 4/4 docs: update show-index hash algorithm for breaking changes modebrian m. carlson, Dec 2, 2025
  3. 1/4 docs: update git hash algorithm for breaking changes modebrian m. carlson, Dec 2, 2025
  4. Junio C HamanoDec 2, 2025
  5. 2/4 docs: update index-pack hash algorithm for breaking changes modebrian m. carlson, Dec 2, 2025
  6. 3/4 docs: update init hash algorithm for breaking changes modebrian m. carlson, Dec 2, 2025
  7. Patrick SteinhardtDec 2, 2025
  8. brian m. carlsonDec 2, 2025

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.