Skip to content

Add --no-ahead-behind to status

Jeff Hostetler git 5 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest4 patches 0 repliesNew
  2. v44 patches 11 repliesSuperseded
  3. v35 patches 8 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v25 patches14 repliesSuperseded
v14 patches12 repliesSuperseded

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4stat_tracking_info: return +1 when branches not equalref-filter.c remote.c remote.h +1 more+36 -200 replies
2/4status: add --[no-]ahead-behind to status and commit for V2 format.Documentation/git-status.txt builtin/commit.c remote.c +4 more+102 -110 replies
3/4status: update short status to respect --no-ahead-behindt/t6040-tracking-info.sh wt-status.c+20 -40 replies
4/4status: support --no-ahead-behind in long formatbuiltin/checkout.c remote.c remote.h +2 more+46 -80 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.

Read the v5 thread

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

From: Jeff Hostetler <[email protected]>

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(-)
Signature · 1 line
2.9.3