[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`::