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 <jeffhost@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
d7d1b496ae
commit
fd9b544a29
5
remote.h
5
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 */
|
||||
|
Reference in New Issue
Block a user