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

Re: [PATCH 2/2] builtin/commit.c: set status_format _after_ option parsing

From
Brandon Casey <casey@nrlssc.navy.mil>
Date
May 26, 2011, 21:34 UTC
Message-ID
<zC-f1fI9ZM3f29xvafX60e8cV8ocMeVmk23oEjhHXxWYhonKbDLDGw@cipher.nrlssc.navy.mil>
In-Reply-To
<20110526211723.GE31340@sigill.intra.peff.net>
On 05/26/2011 04:17 PM, Jeff King wrote:
Show 14 quoted lines
> On Thu, May 26, 2011 at 01:43:21PM -0700, Brandon Casey wrote:
> 
>> 'git status' should use --porcelain output format when -z is given.
>> It was not doing so since the _effect_ of using -z, namely that
>> null_termination would be set, was being checked _before_ option parsing
>> was performed.
>>
>> So, move the check so that it is performed after option parsing.
> 
> Wow, that's an embarrassing bug. I was about to own up to it, but it
> actually looks like it is Junio's bug from 173e6c8 (git stat -s: short
> status output, 2009-08-04). Of course, I _twice_ modified the
> conditional afterwards and failed to notice that it was doing absolutely
> nothing. So I'm not sure which one of us deserves the brown paper bag. :)

:) Well, apparently no one uses -z with git-status anyway (or they only do so in addition to --porcelain). Otherwise it would have been fixed a long time ago.

-Brandon
Previous: Jeff KingNext: Junio C Hamano
Message 4 of 7 in “t7508: demonstrate status's failure to use --porcelain format with -z”
  1. 1/2 t7508: demonstrate status's failure to use --porcelain format with -zBrandon Casey, May 26, 2011
  2. 2/2 builtin/commit.c: set status_format _after_ option parsingBrandon Casey, May 26, 2011
  3. Jeff KingMay 26, 2011
  4. Brandon CaseyMay 26, 2011
  5. Junio C HamanoMay 26, 2011
  6. Brandon CaseyMay 26, 2011
  7. Junio C HamanoMay 26, 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.