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

Re: Question about the ahead-behind computation and status

From
Jeff King <peff@peff.net>
Date
Dec 15, 2017, 10:08 UTC
Message-ID
<20171215100835.GC3567@sigill.intra.peff.net>
In-Reply-To
<030bf57c-7a23-3391-4fc0-93efee791543@jeffhostetler.com>
On Thu, Dec 14, 2017 at 04:49:31PM -0500, Jeff Hostetler wrote:
Show 8 quoted lines
> 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"?

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).

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.

> [*] 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?

-Peff
Previous: Jeff HostetlerNext: Jeff Hostetler
Message 2 of 6 in “Question about the ahead-behind computation and status”
  1. Jeff HostetlerDec 14, 2017
  2. Jeff KingDec 15, 2017
  3. Jeff HostetlerDec 15, 2017
  4. Derrick StoleeDec 15, 2017
  5. Junio C HamanoDec 15, 2017
  6. Derrick StoleeDec 15, 2017

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.