diff options
author | Mathieu Lienard--Mayor <Mathieu.Lienard--Mayor@ensimag.imag.fr> | 2013-06-12 10:06:44 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-06-12 16:59:55 -0700 |
commit | 7e30944622573ebdf87beed057b098af7360234c (patch) | |
tree | f955e84c0c9f38db34106ad261a6ceaff4153354 /advice.c | |
parent | 914dc0289d1df75cfa744cea8ec84cb529cbc791 (diff) | |
download | git-7e30944622573ebdf87beed057b098af7360234c.tar.gz |
rm: introduce advice.rmHints to shorten messages
Introduce advice.rmHints to choose whether to display advice or not
when git rm fails. Defaults to true, in order to preserve current behavior.
As an example, the message:
error: 'foo.txt' has changes staged in the index
(use --cached to keep the file, or -f to force removal)
would look like, with advice.rmHints=false:
error: 'foo.txt' has changes staged in the index
Signed-off-by: Mathieu Lienard--Mayor <Mathieu.Lienard--Mayor@ensimag.imag.fr>
Signed-off-by: Jorge Juan Garcia Garcia <Jorge-Juan.Garcia-Garcia@ensimag.imag.fr>
Signed-off-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'advice.c')
-rw-r--r-- | advice.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -14,6 +14,7 @@ int advice_resolve_conflict = 1; int advice_implicit_identity = 1; int advice_detached_head = 1; int advice_set_upstream_failure = 1; +int advice_rm_hints = 1; static struct { const char *name; @@ -33,6 +34,7 @@ static struct { { "implicitidentity", &advice_implicit_identity }, { "detachedhead", &advice_detached_head }, { "setupstreamfailure", &advice_set_upstream_failure }, + { "rmhints", &advice_rm_hints }, /* make this an alias for backward compatibility */ { "pushnonfastforward", &advice_push_update_rejected } |