public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste•net>
To: <git@vger•kernel.org>
Cc: Junio C Hamano <gitster@pobox•com>, Patrick Steinhardt <ps@pks•im>
Subject: [PATCH 2/4] docs: update index-pack hash algorithm for breaking changes mode
Date: Tue,  2 Dec 2025 01:46:03 +0000	[thread overview]
Message-ID: <20251202014605.52110-3-sandals@crustytoothpaste.net> (raw)
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.
 +

  parent reply	other threads:[~2025-12-02  1:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-02  1:46 [PATCH 0/4] Fix doc default hash algorithm in WITH_BREAKING_CHANGES mode brian m. carlson
2025-12-02  1:46 ` [PATCH 1/4] docs: update git hash algorithm for breaking changes mode brian m. carlson
2025-12-02  7:04   ` Junio C Hamano
2025-12-02  1:46 ` brian m. carlson [this message]
2025-12-02  1:46 ` [PATCH 3/4] docs: update init " brian m. carlson
2025-12-02  1:46 ` [PATCH 4/4] docs: update show-index " brian m. carlson
2025-12-02  8:18 ` [PATCH 0/4] Fix doc default hash algorithm in WITH_BREAKING_CHANGES mode Patrick Steinhardt
2025-12-02 11:52   ` brian m. carlson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251202014605.52110-3-sandals@crustytoothpaste.net \
    --to=sandals@crustytoothpaste$(echo .)net \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    --cc=ps@pks$(echo .)im \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox