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

[PATCH v5 0/4] Add --no-ahead-behind to status

From
JHJeff Hostetler <git@jeffhostetler.com>
Date
Jan 9, 2018, 18:50 UTC
Message-ID
<20180109185018.69164-1-git@jeffhostetler.com>
From: Jeff Hostetler <jeffhost@microsoft.com>

This is version 5 of my patch series to avoid expensive ahead/behind calculations in status. This version completely removes the config setting and is just the --[no-]ahead-behind command line argument.

Internally (inside MSFT) we have had further discussions in this area and identified 2 somewhat independent needs:

[1] The first is to just be able to turn off the a/b calculation when
    the invoker does not need the result at all.
[2] The second is to greatly speed up or limit the a/b calculation on
    extremely large repositories.
    In earlier versions of this patch series, there were several
    discussions of a limited mode that would look for no more than n
    commits or milliseconds.  Also discussed were some problems that
    such limiting will have and it was decided to be not worth the effort.
    We have been discussing some ways to speed up the calculation on the
    client and have tentatively scheduled this shortly.  Hopefully, this
    will eliminate the performance problems and reduce the likelyhood
    that anyone would need to set a config setting to change the default
    behavior (in either porcelain or non-porcelain) formats.

So with that in mind, this version elimates the config setting so that we have don't to carry forward a soon-to-be-obsolete setting.

All that remains in this version is the command line argument to turn on/off the a/b calculation.

Jeff Hostetler (4):
  stat_tracking_info: return +1 when branches not equal
  status: add --[no-]ahead-behind to status and commit for V2 format.
  status: update short status to respect --no-ahead-behind
  status: support --no-ahead-behind in long format
 Documentation/git-status.txt |  5 ++++
 builtin/checkout.c           |  2 +-
 builtin/commit.c             |  7 +++++
 ref-filter.c                 |  8 +++---
 remote.c                     | 50 +++++++++++++++++++++++------------
 remote.h                     | 12 +++++++--
 t/t6040-tracking-info.sh     | 42 ++++++++++++++++++++++++++++++
 t/t7064-wtstatus-pv2.sh      | 62 ++++++++++++++++++++++++++++++++++++++++++++
 wt-status.c                  | 41 ++++++++++++++++++++---------
 wt-status.h                  |  2 ++
 10 files changed, 196 insertions(+), 35 deletions(-)
-- 
2.9.3
Next: Jeff Hostetler
Message 1 of 5 in “Add --no-ahead-behind to status”
  1. 0/4 Add --no-ahead-behind to statusJeff Hostetler, Jan 9, 2018
  2. 3/4 status: update short status to respect --no-ahead-behindJeff Hostetler, Jan 9, 2018
  3. 1/4 stat_tracking_info: return +1 when branches not equalJeff Hostetler, Jan 9, 2018
  4. 2/4 status: add --[no-]ahead-behind to status and commit for V2 format.Jeff Hostetler, Jan 9, 2018
  5. 4/4 status: support --no-ahead-behind in long formatJeff Hostetler, Jan 9, 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.