git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Jeff Hostetler <git@jeffhostetler.com>
Cc: git@vger.kernel.org, gitster@pobox.com,
	Jeff Hostetler <jeffhost@microsoft.com>
Subject: Re: [PATCH 3/4] status: update short status to use --no-ahead-behind
Date: Thu, 21 Dec 2017 10:39:51 -0500	[thread overview]
Message-ID: <20171221153950.GA14411@sigill.intra.peff.net> (raw)
In-Reply-To: <1c019725-7715-496e-bad6-9d47d2bae834@jeffhostetler.com>

On Thu, Dec 21, 2017 at 09:18:17AM -0500, Jeff Hostetler wrote:

> > This patch will affect "git status --porcelain", too. That's not
> > supposed to change in incompatible ways. I guess it's up for debate
> > whether callers are meant to handle any arbitrary string inside the []
> > (we already show "[gone]" for some cases), since AFAICT the format of
> > the tracking info is left completely vague in the documentation.
> > 
> > (I'd also hope that everybody is using --porcelain=v2 if they can, but
> > we should still avoid breaking v1).
> 
> I hadn't intended to alter V1 output.  I'll disable the new feature
> when V1 is selected.

To be clear, I am on the fence regarding the "is it a breaking change"
line. Certainly if the caller says "--no-ahead-behind", I don't see any
harm in doing what they asked.

But one further complication is that this may be triggered by config.
And that goes for --porcelain=v2, as well. Even though the v2
documentation specifically says "ignore headers you don't recognize",
would any callers be confused if a header is omitted due to a user's
config?

I guess for "branch.ab", the answer is "probably not", since it is
already documented to appear only if certain conditions are met. So
probably "omit branch.ab" is an OK change, as is "add a new header".
But I just wonder if it would be simpler to ignore the config entirely
for porcelain outputs (and require the explicit command-line option).

Personally, I am not a purist when it comes to config and plumbing, and
I'd be fine with having the config impact v2 (it is a hint from the user
that they do not want to spend time on the computation, so having
scripts respect that would be what the user wants). If you really have a
script that is unhappy missing "branch.ab", then you can either choose
not to set that config, or you can fix the script to use "--ahead-behind"
to override the config. But I'm not sure everybody in the community
would necessarily agree with me.

-Peff

  reply	other threads:[~2017-12-21 15:40 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-20 14:42 [PATCH 0/4] Add --no-ahead-behind to status Jeff Hostetler
2017-12-20 14:42 ` [PATCH 1/4] status: add --no-ahead-behind to porcelain V2 Jeff Hostetler
2017-12-20 16:07   ` Jeff King
2017-12-20 16:33   ` Jeff King
2017-12-20 19:44     ` Jeff Hostetler
2017-12-20 14:42 ` [PATCH 2/4] stat_tracking_info: return +1 when branch and upstream differ Jeff Hostetler
2017-12-20 16:14   ` Jeff King
2017-12-20 16:37     ` Jeff King
2017-12-21 14:06     ` Jeff Hostetler
2017-12-20 14:42 ` [PATCH 3/4] status: update short status to use --no-ahead-behind Jeff Hostetler
2017-12-20 16:26   ` Jeff King
2017-12-21 14:18     ` Jeff Hostetler
2017-12-21 15:39       ` Jeff King [this message]
2017-12-21 17:47         ` Jeff Hostetler
2017-12-20 14:42 ` [PATCH 4/4] status: support --no-ahead-behind in long status format Jeff Hostetler
2017-12-20 16:33   ` Jeff King
2017-12-20 16:43 ` [PATCH 0/4] Add --no-ahead-behind to status Jeff King

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=20171221153950.GA14411@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@jeffhostetler.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jeffhost@microsoft.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).