summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2017-10-03 09:45:18 -0400
committerJunio C Hamano <gitster@pobox.com>2017-10-04 11:34:15 +0900
commit8126b1267c9b3c8cdc79daf56492972b82f0a57d (patch)
tree4e1cc8e5cdf90793a10fc29748e9dd5ebebc0d07
parente10b3810be4c98100930ad5f3aa4b6e3343d7398 (diff)
downloadgit-8126b1267c9b3c8cdc79daf56492972b82f0a57d.tar.gz
t3205: use --color instead of color.branch=always
To test the color output, we must convince "git branch" to write colors to a non-terminal. We do that now by setting the color config to "always". In preparation for the behavior of "always" changing, let's switch to using the "--color" command-line option, which is more direct. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xt/t3205-branch-color.sh5
1 files changed, 2 insertions, 3 deletions
diff --git a/t/t3205-branch-color.sh b/t/t3205-branch-color.sh
index 9343550f50..4f1e16bb44 100755
--- a/t/t3205-branch-color.sh
+++ b/t/t3205-branch-color.sh
@@ -12,7 +12,6 @@ test_expect_success 'set up some sample branches' '
# choose non-default colors to make sure config
# is taking effect
test_expect_success 'set up some color config' '
- git config color.branch always &&
git config color.branch.local blue &&
git config color.branch.remote yellow &&
git config color.branch.current cyan
@@ -24,7 +23,7 @@ test_expect_success 'regular output shows colors' '
<BLUE>other<RESET>
<YELLOW>remotes/origin/master<RESET>
EOF
- git branch -a >actual.raw &&
+ git branch --color -a >actual.raw &&
test_decode_color <actual.raw >actual &&
test_cmp expect actual
'
@@ -36,7 +35,7 @@ test_expect_success 'verbose output shows colors' '
<BLUE>other <RESET> $oid foo
<YELLOW>remotes/origin/master<RESET> $oid foo
EOF
- git branch -v -a >actual.raw &&
+ git branch --color -v -a >actual.raw &&
test_decode_color <actual.raw >actual &&
test_cmp expect actual
'