From: Junio C Hamano Date: Mon, 07 May 2012 18:10:23 GMT Subject: Re: [PATCH] correct git-status Porcelain Format documentation Message-ID: <7vobpz6ewg.fsf@alter.siamese.dyndns.org> In-Reply-To: <20120506135141.GA17176@sigill.intra.peff.net> Jeff King 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 "## " in the output under the "--porcelain", let's do that right from the beginning. > Also, while looking at the documentation, we say of "-z": "This implies > the --porcelain output format if no other format is given". But the only > other format you could give is "--short", since there is no way to ask > for the long output (and nor do we handle NUL-termination in that code, > anyway). ... nor do we define long porcelain format to begin with. > 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 " in a Porcelain script only once and forget about it.