diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-10-18 14:20:43 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-10-18 14:20:43 +0900 |
commit | e3e3c6a43e7f36d507129909e49d54f1e8ad65e2 (patch) | |
tree | b4ab435d592b835fcc4f0a637d0b758d1600c7cd /t/t6300-for-each-ref.sh | |
parent | 4e4a0c6e794f1f37ba7fa65e5e774b9d6c168afc (diff) | |
parent | b521fd122865dca88b99d05344ec189d39efcefb (diff) | |
download | git-e3e3c6a43e7f36d507129909e49d54f1e8ad65e2.tar.gz |
Merge branch 'jk/ref-filter-colors-fix' into maint
This is the "theoretically more correct" approach of simply
stepping back to the state before plumbing commands started paying
attention to "color.ui" configuration variable.
* jk/ref-filter-colors-fix:
tag: respect color.ui config
Revert "color: check color.ui in git_default_config()"
Revert "t6006: drop "always" color config tests"
Revert "color: make "always" the same as "auto" in config"
color: make "always" the same as "auto" in config
provide --color option for all ref-filter users
t3205: use --color instead of color.branch=always
t3203: drop "always" color test
t6006: drop "always" color config tests
t7502: use diff.noprefix for --verbose test
t7508: use test_terminal for color output
t3701: use test-terminal to collect color output
t4015: prefer --color to -c color.diff=always
test-terminal: set TERM=vt100
Diffstat (limited to 't/t6300-for-each-ref.sh')
-rwxr-xr-x | t/t6300-for-each-ref.sh | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh index edc1bd8eab..d0ad902911 100755 --- a/t/t6300-for-each-ref.sh +++ b/t/t6300-for-each-ref.sh @@ -426,8 +426,7 @@ test_expect_success 'set up color tests' ' ' test_expect_success TTY '%(color) shows color with a tty' ' - test_terminal env TERM=vt100 \ - git for-each-ref --format="$color_format" >actual.raw && + test_terminal git for-each-ref --format="$color_format" >actual.raw && test_decode_color <actual.raw >actual && test_cmp expected.color actual ' @@ -437,12 +436,17 @@ test_expect_success '%(color) does not show color without tty' ' test_cmp expected.bare actual ' -test_expect_success 'color.ui=always can override tty check' ' - git -c color.ui=always for-each-ref --format="$color_format" >actual.raw && +test_expect_success '--color can override tty check' ' + git for-each-ref --color --format="$color_format" >actual.raw && test_decode_color <actual.raw >actual && test_cmp expected.color actual ' +test_expect_success 'color.ui=always does not override tty check' ' + git -c color.ui=always for-each-ref --format="$color_format" >actual && + test_cmp expected.bare actual +' + cat >expected <<\EOF heads/master tags/master |