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

From: "brian m. carlson" <[email-masked]>
Date: Tue, 2 Dec 2025 01:46:05 +0000

When compiled with WITH_BREAKING_CHANGES, the default hash algorithm
switches to SHA-256, but the documentation doesn't reflect this.  Update
the show-index 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 <[email-masked]>
---
 Documentation/git-show-index.adoc | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/Documentation/git-show-index.adoc b/Documentation/git-show-index.adoc
index 00b3a908cd..af5c114bb8 100644
--- a/Documentation/git-show-index.adoc
+++ b/Documentation/git-show-index.adoc
@@ -41,9 +41,17 @@ OPTIONS
 
 --object-format=<hash-algorithm>::
 	Specify the given object format (hash algorithm) for the index file.  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..
+	valid 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[]
 +
 include::object-format-disclaimer.adoc[]