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

[PATCH 1/4] docs: update git hash algorithm for breaking changes mode

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Dec 2, 2025, 01:46 UTC
Message-ID
<20251202014605.52110-2-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 main git 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.adoc | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/Documentation/git.adoc b/Documentation/git.adoc
index ce099e78b8..6123ebcb1b 100644
--- a/Documentation/git.adoc
+++ b/Documentation/git.adoc
@@ -576,7 +576,13 @@ double-quotes and respecting backslash escapes. E.g., the value
 	If this variable is set, the default hash algorithm for new
 	repositories will be set to this value. This value is
 	ignored when cloning and the setting of the remote repository
-	is always used. The default is "sha1".
+	is always used.
+ifndef::with-breaking-changes[]
+	The default is "sha1".
+endif::with-breaking-changes[]
+ifdef::with-breaking-changes[]
+	The default is "sha256".
+endif::with-breaking-changes[]
 	See `--object-format` in linkgit:git-init[1].
 
 `GIT_DEFAULT_REF_FORMAT`::
Previous: brian m. carlsonNext: Junio C Hamano
Message 3 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.