Thread (15 messages) flat view 15 messages, 4 authors, 2016-06-15

Re: [PATCH 3/3] Do not create commits whose message contains NUL

From: Jeff King <hidden>
Date: 2016-06-15 22:52:38

On Thu, Dec 15, 2011 at 10:04:06AM +0900, Miles Bader wrote:
quoted
+       commitWideEncoding::
+               Advice shown when linkgit::git-commit[1] refuses to
+               proceed because there are NULs in commit message.
+               Default: true.
Although "wide encoding" is a reasonable guess at cause of embedded
zero characters (and so a useful term for diagnostic messages, as it
can help users identify the problem in their environment which is
causing such zero bytes), it's really only a guess in most cases...

Shouldn't the variable be named based on what it actually does, which
is allow zero-bytes in commit messages...?
I agree, but...

Really this variable is overkill. The advice.* subsystem is for
silencing hints and warnings from git that you see repeatedly because
you are smarter than git, and want to ignore its advice.

But in this case, I don't see a user saying "stupid git, of _course_ I
want to commit NULs. Stop nagging me". Especially because it is not a
warning, but a fatal error. :)

So yes, it's verbose, but no, it's not something somebody is going to be
so bothered by that they will find the config option to turn it off.
Instead, they will stop doing the bad thing and never see it again.  At
best this config option is useless, and at worst it clutters the
advice.* namespace, making it harder for people to find the advice
option they _do_ want to turn off).

Perhaps it should just be dropped.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help