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 --- remote.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'remote.h') diff --git a/remote.h b/remote.h index 80240f0ada..0a6e770c9e 100644 --- a/remote.h +++ b/remote.h @@ -259,8 +259,9 @@ enum match_refs_flags { /* Flags for --ahead-behind option. */ enum ahead_behind_flags { - AHEAD_BEHIND_QUICK = 0, /* just eq/neq reporting */ - AHEAD_BEHIND_FULL = 1, /* traditional a/b reporting */ + AHEAD_BEHIND_UNSPECIFIED = -1, + AHEAD_BEHIND_QUICK = 0, /* just eq/neq reporting */ + AHEAD_BEHIND_FULL = 1, /* traditional a/b reporting */ }; /* Reporting of tracking info */ -- cgit v1.2.3