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

[PATCH 3/4] docs: update init hash algorithm for breaking changes mode

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Dec 2, 2025, 01:46 UTC
Message-ID
<20251202014605.52110-4-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 init 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-init.adoc | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/Documentation/git-init.adoc b/Documentation/git-init.adoc
index bab99b9b47..17dfef4654 100644
--- a/Documentation/git-init.adoc
+++ b/Documentation/git-init.adoc
@@ -53,7 +53,13 @@ current working directory.
 
 `--object-format=<format>`::
 Specify the given object _<format>_ (hash algorithm) for the repository.  The valid
-values are `sha1` and (if enabled) `sha256`.  `sha1` is the default.
+values are `sha1` and (if enabled) `sha256`.
+ifndef::with-breaking-changes[]
+	`sha1` is the default.
+endif::with-breaking-changes[]
+ifdef::with-breaking-changes[]
+	`sha256` is the default.
+endif::with-breaking-changes[]
 +
 include::object-format-disclaimer.adoc[]
 
Previous: brian m. carlsonNext: Patrick Steinhardt
Message 6 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.