From: Jeff King Date: Tue, 03 Oct 2017 13:45:18 GMT Subject: [PATCH 10/12] t3205: use --color instead of color.branch=always Message-ID: <20171003134518.4egfo7oqpemo3a7q@sigill.intra.peff.net> In-Reply-To: <20171003133713.ccxv6clrmuuhhc3u@sigill.intra.peff.net> 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 --- t/t3205-branch-color.sh | 5 ++--- 1 file 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' ' other remotes/origin/master EOF - git branch -a >actual.raw && + git branch --color -a >actual.raw && test_decode_color actual && test_cmp expect actual ' @@ -36,7 +35,7 @@ test_expect_success 'verbose output shows colors' ' other $oid foo remotes/origin/master $oid foo EOF - git branch -v -a >actual.raw && + git branch --color -v -a >actual.raw && test_decode_color actual && test_cmp expect actual ' -- 2.14.2.1079.gce6b466188