diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-03-08 23:36:24 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-03-08 23:36:24 +0300 |
commit | 4094e47fd2c49fcdbd0152d20ed4d610d72680d7 (patch) | |
tree | 6f444715c2f37cf75953f4df436b6adda1483357 /ref-filter.c | |
parent | c710d182ea6d3846f6f2dc6f1b6c7dbd35c2fce8 (diff) | |
parent | f39a757dd93488103dde76e992a75edf2d772b62 (diff) |
Merge branch 'jh/status-no-ahead-behind'
"git status" can spend a lot of cycles to compute the relation
between the current branch and its upstream, which can now be
disabled with "--no-ahead-behind" option.
* jh/status-no-ahead-behind:
status: support --no-ahead-behind in long format
status: update short status to respect --no-ahead-behind
status: add --[no-]ahead-behind to status and commit for V2 format.
stat_tracking_info: return +1 when branches not equal
Diffstat (limited to 'ref-filter.c')
-rw-r--r-- | ref-filter.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ref-filter.c b/ref-filter.c index 99a45beb14..ac9ac6b0c1 100644 --- a/ref-filter.c +++ b/ref-filter.c @@ -1249,8 +1249,8 @@ static void fill_remote_ref_details(struct used_atom *atom, const char *refname, if (atom->u.remote_ref.option == RR_REF) *s = show_ref(&atom->u.remote_ref.refname, refname); else if (atom->u.remote_ref.option == RR_TRACK) { - if (stat_tracking_info(branch, &num_ours, - &num_theirs, NULL)) { + if (stat_tracking_info(branch, &num_ours, &num_theirs, + NULL, AHEAD_BEHIND_FULL) < 0) { *s = xstrdup(msgs.gone); } else if (!num_ours && !num_theirs) *s = ""; @@ -1267,8 +1267,8 @@ static void fill_remote_ref_details(struct used_atom *atom, const char *refname, free((void *)to_free); } } else if (atom->u.remote_ref.option == RR_TRACKSHORT) { - if (stat_tracking_info(branch, &num_ours, - &num_theirs, NULL)) + if (stat_tracking_info(branch, &num_ours, &num_theirs, + NULL, AHEAD_BEHIND_FULL) < 0) return; if (!num_ours && !num_theirs) |