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

Re: [PATCH v4 0/4] Add --no-ahead-behind to status

From
JHJeff Hostetler <git@jeffhostetler.com>
Date
Jan 8, 2018, 20:04 UTC
Message-ID
<8affe37c-d937-d7e0-fe06-cf7c8db173fa@jeffhostetler.com>
In-Reply-To
<7b759564-5544-8845-0594-e8342a0b4ba5@gmail.com>
On 1/8/2018 2:49 PM, Ben Peart wrote:
Show 13 quoted lines
> 
> 
> On 1/8/2018 10:48 AM, Jeff Hostetler wrote:
>> From: Jeff Hostetler <jeffhost@microsoft.com>
>>
>> This is version 4 of my patch series to avoid expensive ahead/behind
>> calculations in status.  This version removes the last commit containing
>> the experimental config setting.  And removes the undefined return values
>> for the nr_ahead/nr_behind arguments as discussed on the mailing list.
> 
> While I like the simplicity of just turning this off completely, I do wonder if we could come up with a better user experience.  For example, could we somehow limit the time spent computing the before/after and if it exceeds that limit, drop back to saying they are "different" rather than computing the exact number of commits before/after.
> 
> I was thinking about something similar to the logic we use today about whether to start reporting progress on other long commands. That would mean you could still get the ahead/behind values if you aren't that far behind but would only get "different" if that calculation gets too expensive (which implies the actual value isn't going to be all that helpful anyway).

After a off-line conversation with the others I'm going to look into a version that is limited to n commits rather than be completely on or off. I think if you are for example less than 100 a/b then those numbers have value; if you are past n, then they have much less value.

I'd rather do it by a fixed limit than by time to ensure that output is predictable on graph shape and not on system load.

Jeff
Previous: Ben PeartNext: Jeff King
Message 7 of 16 in “Add --no-ahead-behind to status”
  1. 0/4 Add --no-ahead-behind to statusJeff Hostetler, Jan 8, 2018
  2. 1/4 stat_tracking_info: return +1 when branches not equalJeff Hostetler, Jan 8, 2018
  3. 2/4 status: add --[no-]ahead-behind to status and commit for V2 format.Jeff Hostetler, Jan 8, 2018
  4. 3/4 status: update short status to respect --no-ahead-behindJeff Hostetler, Jan 8, 2018
  5. 4/4 status: support --no-ahead-behind in long formatJeff Hostetler, Jan 8, 2018
  6. Ben PeartJan 8, 2018
  7. Jeff HostetlerJan 8, 2018
  8. Jeff KingJan 9, 2018
  9. Johannes SchindelinJan 9, 2018
  10. Derrick StoleeJan 9, 2018
  11. Jeff HostetlerJan 9, 2018
  12. Johannes SchindelinJan 9, 2018
  13. Jeff KingJan 10, 2018
  14. Junio C HamanoJan 10, 2018
  15. Jeff KingJan 11, 2018
  16. Jeff KingJan 10, 2018

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.