From: Jeff Hostetler <email@example.com>
To: Jeff King <firstname.lastname@example.org>
Cc: Git Mailing List <email@example.com>,
Junio C Hamano <firstname.lastname@example.org>,
Ben Peart <email@example.com>,
Jameson Miller <firstname.lastname@example.org>,
Derrick Stolee <email@example.com>
Subject: Re: Question about the ahead-behind computation and status
Date: Fri, 15 Dec 2017 10:08:13 -0500 [thread overview]
Message-ID: <firstname.lastname@example.org> (raw)
On 12/15/2017 5:08 AM, Jeff King wrote:
> On Thu, Dec 14, 2017 at 04:49:31PM -0500, Jeff Hostetler wrote:
>> I don't want to jump into the graph algorithm at this time,
>> but was wondering about adding a --no-ahead-behind flag (or
>> something similar or a config setting) that would disable
>> the a/b computation during status.
>> For status V2 output, we could omit the "# branch.ab x y"
>> line. For normal status output, change the prose a/b
>> message to say something like "are [not] up to date".
> Is it actually "status --porcelain=v2" that you care about here? Or is
> it normal "git status"?
My primary concern is for porcelain V2 because Visual Studio
uses --branch with V2 to get the other branch details with
one process rather than two on inotify events.
Fixing/Helping normal "git status" would be nice for interactive
> Do you care about seeing the branch at all? I.e., would "--no-branch" be
> a viable option (though I notice it seems to be a silent noop with the
> long-form, which should probably be fixed).
VS does not use the a/b counts at all, so it is just overhead.
VS does use some of the other branch fields, so it would be nice
to still have them.
It would be nice to minimize changes to the user experience.
Not printing anything about the a/b in the normal/short/long forms
might give the user a false sense of security. I was thinking if
we changed the message to be "you are [not] up to date", they would
still know they needed to push.
As it is, at this scale, having the message give an exact count
just isn't that useful -- who cares if you are 150,000 or 149,000
Maybe we could do something like GCC and just give up at 100
and print "you are 100+ ...".
> If you really do want to see all branch details but just skip the
> ahead/behind, then yeah, I'd agree that adding an option to do so makes
> sense. Is "status" the only command that needs it? I think we do it
> unconditionally with "git checkout", too.
ok. thanks. i'll look at doing that.
Yeah, "checkout" and "branch -vv" could use it too. I haven't looked
yet to see anywhere else we might want it, but these can wait.
>> [*] Sadly, the local repo was only about 20 days out of
>> date (including the Thanksgiving holidays)....
> Taking 20 seconds to traverse 20 days worth of history sounds pretty
> awful. How many commits is it?
150,000 commits, give or take. The graph is many thousands of lanes
wide because of the merges and that isn't helping.
(But I should give you folks lots of credit -- it *only* took 20
seconds to find, unzip and decode 150,000 commit objects and walk
the commit graph.)
For a true solution, I think we want to wait for client-side
generation numbers before we spend any time looking at the
next prev parent reply other threads:[~2017-12-15 15:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-14 21:49 Question about the ahead-behind computation and status Jeff Hostetler
2017-12-15 10:08 ` Jeff King
2017-12-15 15:08 ` Jeff Hostetler [this message]
2017-12-15 15:43 ` Derrick Stolee
2017-12-15 18:30 ` Junio C Hamano
2017-12-15 19:40 ` Derrick Stolee
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:
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 \
* 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
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).