{"thread":{"id":"50539","subject":"why no mention of \"hooks.allownonascii\" in any man page?","startedAt":"2019-02-19T11:13:49Z","lastAt":"2019-02-19T19:41:27Z","messageCount":4,"participants":["Robert P. J. Day","Ævar Arnfjörð Bjarmason","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"369627","messageId":"alpine.LFD.2.21.1902190544470.23739@localhost.localdomain","threadId":"50539","inReplyTo":null,"subject":"why no mention of \"hooks.allownonascii\" in any man page?","fromName":"Robert P. J. Day","fromEmail":"rpjday@crashcourse.ca","sentAt":"2019-02-19T10:48:07Z","receivedAt":"2019-02-19T11:13:49Z","isPatch":false,"sender":{"key":"rpjday@crashcourse.ca","avatar":"https://avatars.githubusercontent.com/u/226084077?v=4"},"body":"\n  was just perusing the sample hook scripts, and the sample pre-commit\nscript provided with git does the following check:\n\n# If you want to allow non-ASCII filenames set this variable to true.\nallownonascii=$(git config --bool hooks.allownonascii)\n\n  but that config variable (hooks.allownonascii) is not mentioned in\nany man page. its entire existence in the git code base consists of:\n\n$ grep -r allownonascii *\ntemplates/hooks--pre-commit.sample:allownonascii=$(git config --bool hooks.allownonascii)\ntemplates/hooks--pre-commit.sample:if [ \"$allownonascii\" != \"true\" ] &&\ntemplates/hooks--pre-commit.sample:  git config hooks.allownonascii true\n\n  technically, there's nothing wrong with that, i just thought it was\na bit weird that a sample hook script refers to a config variable that\nis not referred to in any way elsewhere.\n\n  should i care?\n\nrday\n"},{"id":"369629","messageId":"87mums58f2.fsf@evledraar.gmail.com","threadId":"50539","inReplyTo":"alpine.LFD.2.21.1902190544470.23739@localhost.localdomain","subject":"Re: why no mention of \"hooks.allownonascii\" in any man page?","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2019-02-19T11:23:13Z","receivedAt":"2019-02-19T11:23:17Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Tue, Feb 19 2019, Robert P. J. Day wrote:\n\n>   was just perusing the sample hook scripts, and the sample pre-commit\n> script provided with git does the following check:\n>\n> # If you want to allow non-ASCII filenames set this variable to true.\n> allownonascii=$(git config --bool hooks.allownonascii)\n>\n>   but that config variable (hooks.allownonascii) is not mentioned in\n> any man page. its entire existence in the git code base consists of:\n>\n> $ grep -r allownonascii *\n> templates/hooks--pre-commit.sample:allownonascii=$(git config --bool hooks.allownonascii)\n> templates/hooks--pre-commit.sample:if [ \"$allownonascii\" != \"true\" ] &&\n> templates/hooks--pre-commit.sample:  git config hooks.allownonascii true\n>\n>   technically, there's nothing wrong with that, i just thought it was\n> a bit weird that a sample hook script refers to a config variable that\n> is not referred to in any way elsewhere.\n\nThe hook itself spontaneously introduces it and uses it. There's nothing\nmagical about config variable, e.g. it could also be \"xyz.abc\" instead\nof \"hooks.allownonascii\".\n\nBut perhaps it should be documented as the functionality of the default\nhook in githooks(5), similarly to how we document\nhooks.allowunannotated. Patches welcome :)\n"},{"id":"369630","messageId":"alpine.LFD.2.21.1902190629490.25090@localhost.localdomain","threadId":"50539","inReplyTo":"87mums58f2.fsf@evledraar.gmail.com","subject":"Re: why no mention of \"hooks.allownonascii\" in any man page?","fromName":"Robert P. J. Day","fromEmail":"rpjday@crashcourse.ca","sentAt":"2019-02-19T11:38:52Z","receivedAt":"2019-02-19T11:38:57Z","isPatch":false,"sender":{"key":"rpjday@crashcourse.ca","avatar":"https://avatars.githubusercontent.com/u/226084077?v=4"},"body":"On Tue, 19 Feb 2019, Ævar Arnfjörð Bjarmason wrote:\n\n>\n> On Tue, Feb 19 2019, Robert P. J. Day wrote:\n>\n> >   was just perusing the sample hook scripts, and the sample pre-commit\n> > script provided with git does the following check:\n> >\n> > # If you want to allow non-ASCII filenames set this variable to true.\n> > allownonascii=$(git config --bool hooks.allownonascii)\n> >\n> >   but that config variable (hooks.allownonascii) is not mentioned in\n> > any man page. its entire existence in the git code base consists of:\n> >\n> > $ grep -r allownonascii *\n> > templates/hooks--pre-commit.sample:allownonascii=$(git config --bool hooks.allownonascii)\n> > templates/hooks--pre-commit.sample:if [ \"$allownonascii\" != \"true\" ] &&\n> > templates/hooks--pre-commit.sample:  git config hooks.allownonascii true\n> >\n> >   technically, there's nothing wrong with that, i just thought it was\n> > a bit weird that a sample hook script refers to a config variable that\n> > is not referred to in any way elsewhere.\n>\n> The hook itself spontaneously introduces it and uses it. There's\n> nothing magical about config variable, e.g. it could also be\n> \"xyz.abc\" instead of \"hooks.allownonascii\".\n>\n> But perhaps it should be documented as the functionality of the\n> default hook in githooks(5), similarly to how we document\n> hooks.allowunannotated. Patches welcome :)\n\n  sure, i'll take care of that.\n\nrday\n\n-- \n\n========================================================================\nRobert P. J. Day                                 Ottawa, Ontario, CANADA\n                  http://crashcourse.ca/dokuwiki\n\nTwitter:                                       http://twitter.com/rpjday\nLinkedIn:                               http://ca.linkedin.com/in/rpjday\n========================================================================"},{"id":"369662","messageId":"xmqqftsj1s7y.fsf@gitster-ct.c.googlers.com","threadId":"50539","inReplyTo":"alpine.LFD.2.21.1902190629490.25090@localhost.localdomain","subject":"Re: why no mention of \"hooks.allownonascii\" in any man page?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-02-19T19:41:21Z","receivedAt":"2019-02-19T19:41:27Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Robert P. J. Day\" <rpjday@crashcourse.ca> writes:\n\n>> But perhaps it should be documented as the functionality of the\n>> default hook in githooks(5), similarly to how we document\n>> hooks.allowunannotated. Patches welcome :)\n>\n>   sure, i'll take care of that.\n\nSounds like a sensible way forward.  Thanks, both.\n"}]}