Documentation fix related to hash algorithm
cover Documentation fix related to hash algorithm
I was doing some research on the SHA256 implementation, and I discovered a mismatch between the docs and the code. I have a patch attached that fixes the docs.
Toon Claes (1):
Documentation: correct hash environment variable
Documentation/git.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
--
2.27.0.rc1.72.g3440a8306a
PATCH 1/1 Documentation: correct hash environment variable
To set the default hash algorithm you can set the GIT_DEFAULT_HASH environment variable. In the documentation this variable was named GIT_DEFAULT_HASH_ALGORITHM, which was incorrect.
--- Documentation/git.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/git.txt +1 -1
@@ -493,7 +493,7 @@ double-quotes and respecting backslash escapes. E.g., the value details. This variable has lower precedence than other path variables such as GIT_INDEX_FILE, GIT_OBJECT_DIRECTORY... -`GIT_DEFAULT_HASH_ALGORITHM`:: +`GIT_DEFAULT_HASH`:: If this variable is set, the default hash algorithm for new repositories will be set to this value. This value is currently ignored when cloning; the setting of the remote repository
Signature · 1 line
2.27.0.rc1.72.g3440a8306a
Re: [PATCH 1/1] Documentation: correct hash environment variable
Quoted 6 lines · Toon Claes
To set the default hash algorithm you can set the
GIT_DEFAULT_HASHenvironment variable. In the documentation this variable was namedGIT_DEFAULT_HASH_ALGORITHM, which was incorrect.Signed-off-by Toon Claes <[email protected]>
I would replace both instances of "was" with "is", since you're describing the state immediately before applying your patch, not after.
Changing that and wrapping at 72 characters yields something like
To set the default hash algorithm you can set the GIT_DEFAULT_HASH environment variable. In the documentation this variable is named GIT_DEFAULT_HASH_ALGORITHM, which is incorrect.
Nits aside...
Quoted 5 lines
-
GIT_DEFAULT_HASH_ALGORITHM::
+GIT_DEFAULT_HASH::
If this variable is set, the default hash algorithm for new repositories will be set to this value. This value is currently ignored when cloning; the setting of the remote repository
Indeed. This discrepancy is visible in the commit which added both the documentation and the implementation, 3c9331a129 ("builtin/init-db: add environment variable for new repo hash", 2020-02-22). As developers-only as this variable is, that commit was not in v2.26.0, so this might be worth fixing before cutting v2.27.0.
Martin
Re: [PATCH 1/1] Documentation: correct hash environment variable
Quoted 11 lines · Martin Ågren
Quoted 5 lines
-
GIT_DEFAULT_HASH_ALGORITHM::
+GIT_DEFAULT_HASH::
If this variable is set, the default hash algorithm for new repositories will be set to this value. This value is currently ignored when cloning; the setting of the remote repositoryIndeed. This discrepancy is visible in the commit which added both the documentation and the implementation,
3c9331a129("builtin/init-db: add environment variable for new repo hash", 2020-02-22). As developers-only as this variable is, that commit was not in v2.26.0, so this might be worth fixing before cutting v2.27.0.
Yeah, thanks for catching this. I think this is worth fixing. It doesn't do anything right now except produce an error, but we might as well not mislead people.
Signature · 2 lines
brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204