From: "Robert P. J. Day" <rpjday@crashcourse.ca>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
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 06:38:52 -0500 (EST) [thread overview]
Message-ID: <alpine.LFD.2.21.1902190629490.25090@localhost.localdomain> (raw)
In-Reply-To: <87mums58f2.fsf@evledraar.gmail.com>
[-- 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
========================================================================
next prev parent reply other threads:[~2019-02-19 11:38 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
2019-02-19 11:38 ` Robert P. J. Day [this message]
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=alpine.LFD.2.21.1902190629490.25090@localhost.localdomain \
--to=rpjday@crashcourse.ca \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox