git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] Documentation fix related to hash algorithm
@ 2020-05-25 14:41 Toon Claes
  2020-05-25 14:41 ` [PATCH 1/1] Documentation: correct hash environment variable Toon Claes
  0 siblings, 1 reply; 4+ messages in thread
From: Toon Claes @ 2020-05-25 14:41 UTC (permalink / raw)
  To: git; +Cc: sandals, Toon Claes

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/1] Documentation: correct hash environment variable
  2020-05-25 14:41 [PATCH 0/1] Documentation fix related to hash algorithm Toon Claes
@ 2020-05-25 14:41 ` Toon Claes
  2020-05-25 16:42   ` Martin Ågren
  0 siblings, 1 reply; 4+ messages in thread
From: Toon Claes @ 2020-05-25 14:41 UTC (permalink / raw)
  To: git; +Cc: sandals, Toon Claes

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(-)

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
-- 
2.27.0.rc1.72.g3440a8306a


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] Documentation: correct hash environment variable
  2020-05-25 14:41 ` [PATCH 1/1] Documentation: correct hash environment variable Toon Claes
@ 2020-05-25 16:42   ` Martin Ågren
  2020-05-25 17:57     ` brian m. carlson
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Ågren @ 2020-05-25 16:42 UTC (permalink / raw)
  To: Toon Claes; +Cc: Git Mailing List, brian m. carlson

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] Documentation: correct hash environment variable
  2020-05-25 16:42   ` Martin Ågren
@ 2020-05-25 17:57     ` brian m. carlson
  0 siblings, 0 replies; 4+ messages in thread
From: brian m. carlson @ 2020-05-25 17:57 UTC (permalink / raw)
  To: Martin Ågren; +Cc: Toon Claes, Git Mailing List

[-- Attachment #1: Type: text/plain, Size: 924 bytes --]

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.
-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-05-25 17:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-25 14:41 [PATCH 0/1] Documentation fix related to hash algorithm Toon Claes
2020-05-25 14:41 ` [PATCH 1/1] Documentation: correct hash environment variable Toon Claes
2020-05-25 16:42   ` Martin Ågren
2020-05-25 17:57     ` brian m. carlson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).