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>
Jeff King committed
Oct 3, 2017 at 09:45 UTC
8126b1267c9b3c8cdc79daf56492972b82f0a57d
1 file changed
+2
-3
t/t3205-branch-color.sh
+2
-3
@@ -12,7 +12,6 @@ test_expect_success 'set up some sample branches' '
12
# choose non-default colors to make sure config
13
# is taking effect
14
test_expect_success 'set up some color config' '
15
- git config color.branch always &&
15
git config color.branch.local blue &&
16
git config color.branch.remote yellow &&
17
git config color.branch.current cyan
@@ -24,7 +23,7 @@ test_expect_success 'regular output shows colors' '
23
<BLUE>other<RESET>
24
<YELLOW>remotes/origin/master<RESET>
25
EOF
27
- git branch -a >actual.raw &&
26
+ git branch --color -a >actual.raw &&
27
test_decode_color <actual.raw >actual &&
28
test_cmp expect actual
29
'
@@ -36,7 +35,7 @@ test_expect_success 'verbose output shows colors' '
35
<BLUE>other <RESET> $oid foo
36
<YELLOW>remotes/origin/master<RESET> $oid foo
37
EOF
39
- git branch -v -a >actual.raw &&
38
+ git branch --color -v -a >actual.raw &&
39
test_decode_color <actual.raw >actual &&
40
test_cmp expect actual
41
'