status: warn when a/b calculation takes too long
The ahead/behind calculation in 'git status' can be slow in some cases. Users may not realize that there are ways to avoid this computation, especially if they are not using the information. Add a warning that appears if this calculation takes more than two seconds. The warning can be disabled through the new config setting advice.statusAheadBehind. Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
06b324c1d7
commit
0a53561a62
2
advice.c
2
advice.c
@ -12,6 +12,7 @@ int advice_push_needs_force = 1;
|
||||
int advice_push_unqualified_ref_name = 1;
|
||||
int advice_status_hints = 1;
|
||||
int advice_status_u_option = 1;
|
||||
int advice_status_ahead_behind_warning = 1;
|
||||
int advice_commit_before_merge = 1;
|
||||
int advice_reset_quiet_warning = 1;
|
||||
int advice_resolve_conflict = 1;
|
||||
@ -68,6 +69,7 @@ static struct {
|
||||
{ "pushUnqualifiedRefName", &advice_push_unqualified_ref_name },
|
||||
{ "statusHints", &advice_status_hints },
|
||||
{ "statusUoption", &advice_status_u_option },
|
||||
{ "statusAheadBehindWarning", &advice_status_ahead_behind_warning },
|
||||
{ "commitBeforeMerge", &advice_commit_before_merge },
|
||||
{ "resetQuiet", &advice_reset_quiet_warning },
|
||||
{ "resolveConflict", &advice_resolve_conflict },
|
||||
|
||||
Reference in New Issue
Block a user