summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Jeff Hostetler <jeffhost@microsoft.com>2018-01-09 18:50:18 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-01-24 13:48:39 -0800
commitf39a757dd93488103dde76e992a75edf2d772b62 (patch)
treed27d738996d848c0d0e2bababaf4435040fc34f0 /builtin
parentstatus: update short status to respect --no-ahead-behind (diff)
downloadtgif-f39a757dd93488103dde76e992a75edf2d772b62.tar.xz
status: support --no-ahead-behind in long format
Teach long (normal) status format to respect the --no-ahead-behind parameter and skip the possibly expensive ahead/behind computation between the branch and the upstream. Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/checkout.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 8bdc927d3f..70d5785a5d 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -610,7 +610,7 @@ static void report_tracking(struct branch_info *new)
struct strbuf sb = STRBUF_INIT;
struct branch *branch = branch_get(new->name);
- if (!format_tracking_info(branch, &sb))
+ if (!format_tracking_info(branch, &sb, AHEAD_BEHIND_FULL))
return;
fputs(sb.buf, stdout);
strbuf_release(&sb);