]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jh/status-no-ahead-behind'
authorJunio C Hamano <gitster@pobox.com>
Thu, 8 Mar 2018 20:36:24 +0000 (12:36 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 8 Mar 2018 20:36:24 +0000 (12:36 -0800)
"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

1  2 
Documentation/git-status.txt
builtin/checkout.c
builtin/commit.c
ref-filter.c
remote.c
remote.h
wt-status.c
wt-status.h

Simple merge
index a52af2e50705312a6d42df8667bbe4f5dfab8c86,70d5785a5d95b17576546bfa027b44b12cdbfddd..8f4dfb104662baa3f32c350cf58e0f2b797dff29
@@@ -604,12 -605,12 +604,12 @@@ static int merge_working_tree(const str
        return 0;
  }
  
 -static void report_tracking(struct branch_info *new)
 +static void report_tracking(struct branch_info *new_branch_info)
  {
        struct strbuf sb = STRBUF_INIT;
 -      struct branch *branch = branch_get(new->name);
 +      struct branch *branch = branch_get(new_branch_info->name);
  
-       if (!format_tracking_info(branch, &sb))
+       if (!format_tracking_info(branch, &sb, AHEAD_BEHIND_FULL))
                return;
        fputs(sb.buf, stdout);
        strbuf_release(&sb);
Simple merge
diff --cc ref-filter.c
Simple merge
diff --cc remote.c
Simple merge
diff --cc remote.h
Simple merge
diff --cc wt-status.c
Simple merge
diff --cc wt-status.h
Simple merge