All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: "Robert P. J. Day" <rpjday@crashcourse.ca>
Cc: Git Mailing list <git@vger.kernel.org>
Subject: Re: why no mention of "hooks.allownonascii" in any man page?
Date: Tue, 19 Feb 2019 12:23:13 +0100	[thread overview]
Message-ID: <87mums58f2.fsf@evledraar.gmail.com> (raw)
In-Reply-To: <alpine.LFD.2.21.1902190544470.23739@localhost.localdomain>


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

  reply	other threads:[~2019-02-19 11:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2019-02-19 11:38   ` Robert P. J. Day
2019-02-19 19:41     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mums58f2.fsf@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=rpjday@crashcourse.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.