Message ID | 20200525144138.1624272-2-toon@iotcl.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Documentation fix related to hash algorithm | expand |
On Mon, 25 May 2020 at 16:52, Toon Claes <toon@iotcl.com> wrote: > > 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. > > Signed-off-by: Toon Claes <toon@iotcl.com> 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... > -`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
On 2020-05-25 at 16:42:57, Martin Ågren wrote: > > -`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. 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.
diff --git a/Documentation/git.txt b/Documentation/git.txt index 9d6769e95a..12890841c4 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -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
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. Signed-off-by: Toon Claes <toon@iotcl.com> --- Documentation/git.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)