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

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

From
Jeff King <peff@peff.net>
Date
Dec 15, 2011, 01:18 UTC
Message-ID
<20111215011855.GA24568@sigill.intra.peff.net>
In-Reply-To
<CADCnXoaqEXJV+Mb1=nQge_bjA3H6R7=BPt213CKLX55zyTHEtg@mail.gmail.com>
On Thu, Dec 15, 2011 at 10:04:06AM +0900, Miles Bader wrote:
Show 12 quoted lines
> > +       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
Previous: Miles BaderNext: Junio C Hamano
Message 22 of 23 in “Do not create commits whose message contains NUL”
  1. Do not create commits whose message contains NULNguyễn Thái Ngọc Duy, Dec 13, 2011
  2. Jeff KingDec 13, 2011
  3. Miles BaderDec 14, 2011
  4. Jeff KingDec 14, 2011
  5. Drew NorthupJan 1, 2012
  6. Jeff KingJan 3, 2012
  7. 0/3 git-commit rejects messages with NULsNguyễn Thái Ngọc Duy, Dec 14, 2011
  8. 1/3 Make commit_tree() take message length in addition to the commit messageNguyễn Thái Ngọc Duy, Dec 14, 2011
  9. Junio C HamanoDec 14, 2011
  10. 1/3 merge: abort if fails to commitNguyễn Thái Ngọc Duy, Dec 15, 2011
  11. 2/3 Convert commit_tree() to take strbuf as messageNguyễn Thái Ngọc Duy, Dec 15, 2011
  12. 3/3 commit: refuse commit messages that contain NULsNguyễn Thái Ngọc Duy, Dec 15, 2011
  13. Junio C HamanoDec 15, 2011
  14. 2/3 merge: abort if fails to commitNguyễn Thái Ngọc Duy, Dec 14, 2011
  15. Junio C HamanoDec 14, 2011
  16. 3/3 Do not create commits whose message contains NULNguyễn Thái Ngọc Duy, Dec 14, 2011
  17. Junio C HamanoDec 14, 2011
  18. Jeff KingDec 14, 2011
  19. Junio C HamanoDec 15, 2011
  20. Junio C HamanoDec 15, 2011
  21. Miles BaderDec 15, 2011
  22. Jeff KingDec 15, 2011
  23. Junio C HamanoDec 15, 2011

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.