summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorRyan Dammrose <ryandammrose@gmail.com>2018-04-21 10:10:00 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-04-24 01:38:47 (GMT)
commit960786e7618942357c45e7e4c234f113e0aea9b1 (patch)
tree1edc46bc7944e13bc08c8ad4794e39bc14ed1cc3 /config.c
parent295d949cfabc18fb588f269c77d1f8ff4a613686 (diff)
downloadgit-960786e7618942357c45e7e4c234f113e0aea9b1.zip
git-960786e7618942357c45e7e4c234f113e0aea9b1.tar.gz
git-960786e7618942357c45e7e4c234f113e0aea9b1.tar.bz2
push: colorize errors
This is an attempt to resolve an issue I experience with people that are new to Git -- especially colleagues in a team setting -- where they miss that their push to a remote location failed because the failure and success both return a block of white text. An example is if I push something to a remote repository and then a colleague attempts to push to the same remote repository and the push fails because it requires them to pull first, but they don't notice because a success and failure both return a block of white text. They then continue about their business, thinking it has been successfully pushed. This patch colorizes the errors and hints (in red and yellow, respectively) so whenever there is a failure when pushing to a remote repository that fails, it is more noticeable. [jes: fixed a couple bugs, added the color.{advice,push,transport} settings, refactored to use want_color_stderr().] Signed-off-by: Ryan Dammrose ryandammrose@gmail.com Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'config.c')
-rw-r--r--config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/config.c b/config.c
index c698988..f21317a 100644
--- a/config.c
+++ b/config.c
@@ -1365,7 +1365,7 @@ int git_default_config(const char *var, const char *value, void *dummy)
if (starts_with(var, "mailmap."))
return git_default_mailmap_config(var, value);
- if (starts_with(var, "advice."))
+ if (starts_with(var, "advice.") || starts_with(var, "color.advice"))
return git_default_advice_config(var, value);
if (!strcmp(var, "pager.color") || !strcmp(var, "color.pager")) {