git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* why no mention of "hooks.allownonascii" in any man page?
@ 2019-02-19 10:48 Robert P. J. Day
  2019-02-19 11:23 ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 4+ messages in thread
From: Robert P. J. Day @ 2019-02-19 10:48 UTC (permalink / raw)
  To: Git Mailing list


  was just perusing the sample hook scripts, and the sample pre-commit
script provided with git does the following check:

# If you want to allow non-ASCII filenames set this variable to true.
allownonascii=$(git config --bool hooks.allownonascii)

  but that config variable (hooks.allownonascii) is not mentioned in
any man page. its entire existence in the git code base consists of:

$ grep -r allownonascii *
templates/hooks--pre-commit.sample:allownonascii=$(git config --bool hooks.allownonascii)
templates/hooks--pre-commit.sample:if [ "$allownonascii" != "true" ] &&
templates/hooks--pre-commit.sample:  git config hooks.allownonascii true

  technically, there's nothing wrong with that, i just thought it was
a bit weird that a sample hook script refers to a config variable that
is not referred to in any way elsewhere.

  should i care?

rday

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

* Re: why no mention of "hooks.allownonascii" in any man page?
  2019-02-19 10:48 why no mention of "hooks.allownonascii" in any man page? Robert P. J. Day
@ 2019-02-19 11:23 ` Ævar Arnfjörð Bjarmason
  2019-02-19 11:38   ` Robert P. J. Day
  0 siblings, 1 reply; 4+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2019-02-19 11:23 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: Git Mailing list


On Tue, Feb 19 2019, Robert P. J. Day wrote:

>   was just perusing the sample hook scripts, and the sample pre-commit
> script provided with git does the following check:
>
> # If you want to allow non-ASCII filenames set this variable to true.
> allownonascii=$(git config --bool hooks.allownonascii)
>
>   but that config variable (hooks.allownonascii) is not mentioned in
> any man page. its entire existence in the git code base consists of:
>
> $ grep -r allownonascii *
> templates/hooks--pre-commit.sample:allownonascii=$(git config --bool hooks.allownonascii)
> templates/hooks--pre-commit.sample:if [ "$allownonascii" != "true" ] &&
> templates/hooks--pre-commit.sample:  git config hooks.allownonascii true
>
>   technically, there's nothing wrong with that, i just thought it was
> a bit weird that a sample hook script refers to a config variable that
> is not referred to in any way elsewhere.

The hook itself spontaneously introduces it and uses it. There's nothing
magical about config variable, e.g. it could also be "xyz.abc" instead
of "hooks.allownonascii".

But perhaps it should be documented as the functionality of the default
hook in githooks(5), similarly to how we document
hooks.allowunannotated. Patches welcome :)

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

* Re: why no mention of "hooks.allownonascii" in any man page?
  2019-02-19 11:23 ` Ævar Arnfjörð Bjarmason
@ 2019-02-19 11:38   ` Robert P. J. Day
  2019-02-19 19:41     ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Robert P. J. Day @ 2019-02-19 11:38 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: Git Mailing list

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

On Tue, 19 Feb 2019, Ævar Arnfjörð Bjarmason wrote:

>
> On Tue, Feb 19 2019, Robert P. J. Day wrote:
>
> >   was just perusing the sample hook scripts, and the sample pre-commit
> > script provided with git does the following check:
> >
> > # If you want to allow non-ASCII filenames set this variable to true.
> > allownonascii=$(git config --bool hooks.allownonascii)
> >
> >   but that config variable (hooks.allownonascii) is not mentioned in
> > any man page. its entire existence in the git code base consists of:
> >
> > $ grep -r allownonascii *
> > templates/hooks--pre-commit.sample:allownonascii=$(git config --bool hooks.allownonascii)
> > templates/hooks--pre-commit.sample:if [ "$allownonascii" != "true" ] &&
> > templates/hooks--pre-commit.sample:  git config hooks.allownonascii true
> >
> >   technically, there's nothing wrong with that, i just thought it was
> > a bit weird that a sample hook script refers to a config variable that
> > is not referred to in any way elsewhere.
>
> The hook itself spontaneously introduces it and uses it. There's
> nothing magical about config variable, e.g. it could also be
> "xyz.abc" instead of "hooks.allownonascii".
>
> But perhaps it should be documented as the functionality of the
> default hook in githooks(5), similarly to how we document
> hooks.allowunannotated. Patches welcome :)

  sure, i'll take care of that.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                  http://crashcourse.ca/dokuwiki

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

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

* Re: why no mention of "hooks.allownonascii" in any man page?
  2019-02-19 11:38   ` Robert P. J. Day
@ 2019-02-19 19:41     ` Junio C Hamano
  0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2019-02-19 19:41 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: Ævar Arnfjörð Bjarmason, Git Mailing list

"Robert P. J. Day" <rpjday@crashcourse.ca> writes:

>> But perhaps it should be documented as the functionality of the
>> default hook in githooks(5), similarly to how we document
>> hooks.allowunannotated. Patches welcome :)
>
>   sure, i'll take care of that.

Sounds like a sensible way forward.  Thanks, both.

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

end of thread, other threads:[~2019-02-19 19:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-19 10:48 why no mention of "hooks.allownonascii" in any man page? Robert P. J. Day
2019-02-19 11:23 ` Ævar Arnfjörð Bjarmason
2019-02-19 11:38   ` Robert P. J. Day
2019-02-19 19:41     ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).