summary refs log tree commit diff
path: root/remote.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-03-08 12:36:24 -0800
committerJunio C Hamano <gitster@pobox.com>2018-03-08 12:36:24 -0800
commit4094e47fd2c49fcdbd0152d20ed4d610d72680d7 (patch)
tree6f444715c2f37cf75953f4df436b6adda1483357 /remote.h
parentc710d182ea6d3846f6f2dc6f1b6c7dbd35c2fce8 (diff)
parentf39a757dd93488103dde76e992a75edf2d772b62 (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 'remote.h')
-rw-r--r--remote.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/remote.h b/remote.h
index 271afe1bab..f09c01969d 100644
--- a/remote.h
+++ b/remote.h
@@ -258,10 +258,18 @@ enum match_refs_flags {
 	MATCH_REFS_FOLLOW_TAGS	= (1 << 3)
 };
 
+/* Flags for --ahead-behind option. */
+enum ahead_behind_flags {
+	AHEAD_BEHIND_UNSPECIFIED = -1,
+	AHEAD_BEHIND_QUICK       =  0,  /* just eq/neq reporting */
+	AHEAD_BEHIND_FULL        =  1,  /* traditional a/b reporting */
+};
+
 /* Reporting of tracking info */
 int stat_tracking_info(struct branch *branch, int *num_ours, int *num_theirs,
-		       const char **upstream_name);
-int format_tracking_info(struct branch *branch, struct strbuf *sb);
+		       const char **upstream_name, enum ahead_behind_flags abf);
+int format_tracking_info(struct branch *branch, struct strbuf *sb,
+			 enum ahead_behind_flags abf);
 
 struct ref *get_local_heads(void);
 /*