git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org, Zak Johnson <zakj@nox.cx>
Subject: Re: [PATCH] correct git-status Porcelain Format documentation
Date: Mon, 07 May 2012 11:10:23 -0700	[thread overview]
Message-ID: <7vobpz6ewg.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20120506135141.GA17176@sigill.intra.peff.net> (Jeff King's message of "Sun, 6 May 2012 09:51:42 -0400")

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.

> 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 <whatever else>" in a Porcelain script only
once and forget about it.

  reply	other threads:[~2012-05-07 18:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-06 13:29 [PATCH] correct git-status Porcelain Format documentation Jeff King
2012-05-06 13:51 ` Jeff King
2012-05-07 18:10   ` Junio C Hamano [this message]
2012-05-07 18:13     ` Jeff King
2012-05-07 21:21       ` Jeff King
2012-05-07 21:22         ` [PATCH 1/5] commit: refactor option parsing Jeff King
2012-05-07 21:23         ` [PATCH 2/5] status: refactor colopts handling Jeff King
2012-05-08 13:27           ` Nguyen Thai Ngoc Duy
2012-05-07 21:24         ` [PATCH 3/5] status: refactor null_termination option Jeff King
2012-05-07 21:24         ` [PATCH 4/5] status: fix null termination with "-b" Jeff King
2012-05-07 21:25         ` [PATCH 5/5] status: respect "-b" for porcelain format Jeff King
2012-05-07 21:28           ` Jeff King
2012-05-08  4:55             ` Junio C Hamano
2012-05-08  9:04               ` Jeff King
2012-05-08 17:52                 ` Junio C Hamano
2012-05-07 18:03 ` [PATCH] correct git-status Porcelain Format documentation Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vobpz6ewg.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=zakj@nox.cx \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).