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

Re: [PATCH] correct git-status Porcelain Format documentation

From
Jeff King <peff@peff.net>
Date
May 7, 2012, 18:13 UTC
Message-ID
<20120507181348.GA26977@sigill.intra.peff.net>
In-Reply-To
<7vobpz6ewg.fsf@alter.siamese.dyndns.org>
On Mon, May 07, 2012 at 11:10:23AM -0700, Junio C Hamano wrote:
Show 12 quoted lines
> Jeff King <peff@peff.net> writes:
> 
> > What should "git status --porcelain -z -b" look like? With my patch, it
> > prints the branch-line with only a newline, not respecting the NUL
> > termination. Which sounds like a bug, except that's what happens _now_
> > with "git status --short -z -b".  Which seems like a bug to me, but
> > maybe somebody is relying on that. It seems kind of broken to me.
> 
> It is broken; and it is not a problem if somebody relied on a broken
> output without giving --porcelain in a script and such a script needs to
> be updated.  If we are updating the code to give "## <branch>" in the
> output under the "--porcelain", let's do that right from the beginning.
OK, that matches my feelings.
Show 9 quoted lines
> > Should this be simplified to just "this implies porcelain"?
> >
> > That would technically break somebody who wanted their
> > status.relativePaths config option respected. But it kind of seems crazy
> > to me.
> 
> I do not think it is worth changing it.  It is not too much touble to
> spell "status --porcelain -z <whatever else>" in a Porcelain script only
> once and forget about it.

OK. I think it makes it conceptually simpler, but of the problems I listed, that is the least bug-like.

I'll prepare a series to fix "-b -z" and "-b --porcelain".
-Peff
Previous: Junio C HamanoNext: Jeff King
Message 4 of 16 in “correct git-status Porcelain Format documentation”
  1. correct git-status Porcelain Format documentationJeff King, May 6, 2012
  2. Jeff KingMay 6, 2012
  3. Junio C HamanoMay 7, 2012
  4. Jeff KingMay 7, 2012
  5. Jeff KingMay 7, 2012
  6. 1/5 commit: refactor option parsingJeff King, May 7, 2012
  7. 2/5 status: refactor colopts handlingJeff King, May 7, 2012
  8. Nguyen Thai Ngoc DuyMay 8, 2012
  9. 3/5 status: refactor null_termination optionJeff King, May 7, 2012
  10. 4/5 status: fix null termination with "-b"Jeff King, May 7, 2012
  11. 5/5 status: respect "-b" for porcelain formatJeff King, May 7, 2012
  12. Jeff KingMay 7, 2012
  13. Junio C HamanoMay 8, 2012
  14. Jeff KingMay 8, 2012
  15. Junio C HamanoMay 8, 2012
  16. Junio C HamanoMay 7, 2012

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.