git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: why no mention of "hooks.allownonascii" in any man page?

From
Robert P. J. Day <rpjday@crashcourse.ca>
Date
Feb 19, 2019, 11:38 UTC
Message-ID
<alpine.LFD.2.21.1902190629490.25090@localhost.localdomain>
In-Reply-To
<87mums58f2.fsf@evledraar.gmail.com>
On Tue, 19 Feb 2019, Ævar Arnfjörð Bjarmason wrote:
Show 28 quoted lines
>
> 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
========================================================================
Previous: Ævar Arnfjörð BjarmasonNext: Junio C Hamano
Message 3 of 4 in “why no mention of "hooks.allownonascii" in any man page?”
  1. Robert P. J. DayFeb 19, 2019
  2. Ævar Arnfjörð BjarmasonFeb 19, 2019
  3. Robert P. J. DayFeb 19, 2019
  4. Junio C HamanoFeb 19, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.