From fd9b544a2991ad74d73ad1bc0af4d24f91a6802b Mon Sep 17 00:00:00 2001 From: Jeff Hostetler Date: Tue, 9 Jan 2018 18:50:16 +0000 Subject: status: add --[no-]ahead-behind to status and commit for V2 format. Teach "git status" and "git commit" to accept "--no-ahead-behind" and "--ahead-behind" arguments to request quick or full ahead/behind reporting. When "--no-ahead-behind" is given, the existing porcelain V2 line "branch.ab +x -y" is replaced with a new "branch.ab +? -?" line. This indicates that the branch and its upstream are or are not equal without the expense of computing the full ahead/behind values. Signed-off-by: Jeff Hostetler Signed-off-by: Junio C Hamano --- wt-status.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'wt-status.h') diff --git a/wt-status.h b/wt-status.h index fe27b465e..b91267455 100644 --- a/wt-status.h +++ b/wt-status.h @@ -5,6 +5,7 @@ #include "string-list.h" #include "color.h" #include "pathspec.h" +#include "remote.h" struct worktree; @@ -86,6 +87,7 @@ struct wt_status { int show_branch; int show_stash; int hints; + enum ahead_behind_flags ahead_behind_flags; enum wt_status_format status_format; unsigned char sha1_commit[GIT_MAX_RAWSZ]; /* when not Initial */ -- cgit v1.2.3