diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-05-08 15:59:34 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-05-08 15:59:34 +0900 |
commit | a56fb3dcc09239795823de40ffcbbf5713114eb5 (patch) | |
tree | bbaacfff89ae614d0218b38705e43ea4d455e59b /t | |
parent | 3915f9a4fa2ae48b282a71f72113ca8629b27618 (diff) | |
parent | 79f62e7dd96ae0cf98b7eca1b763012d1a4db0bb (diff) | |
download | git-a56fb3dcc09239795823de40ffcbbf5713114eb5.tar.gz |
Merge branch 'js/colored-push-errors'
Error messages from "git push" can be painted for more visibility.
* js/colored-push-errors:
config: document the settings to colorize push errors/hints
push: test to verify that push errors are colored
push: colorize errors
color: introduce support for colorizing stderr
Diffstat (limited to 't')
-rwxr-xr-x | t/t5541-http-push-smart.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t5541-http-push-smart.sh b/t/t5541-http-push-smart.sh index 21340e89c9..a2af693068 100755 --- a/t/t5541-http-push-smart.sh +++ b/t/t5541-http-push-smart.sh @@ -377,5 +377,17 @@ test_expect_success 'push status output scrubs password' ' grep "^To $HTTPD_URL/smart/test_repo.git" status ' +test_expect_success 'colorize errors/hints' ' + cd "$ROOT_PATH"/test_repo_clone && + test_must_fail git -c color.transport=always -c color.advice=always \ + -c color.push=always \ + push origin origin/master^:master 2>act && + test_decode_color <act >decoded && + test_i18ngrep "<RED>.*rejected.*<RESET>" decoded && + test_i18ngrep "<RED>error: failed to push some refs" decoded && + test_i18ngrep "<YELLOW>hint: " decoded && + test_i18ngrep ! "^hint: " decoded +' + stop_httpd test_done |