From: Junio C Hamano Date: Wed, 15 Nov 2017 03:04:50 +0000 (+0900) Subject: Merge branch 'kd/auto-col-with-pager-fix' into maint X-Git-Tag: v2.15.1~40 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/e18b1df299a82c8edc262091dc0b77b1f13c5f0b?hp=-c Merge branch 'kd/auto-col-with-pager-fix' into maint "auto" as a value for the columnar output configuration ought to judge "is the output consumed by humans?" with the same criteria as "auto" for coloured output configuration, i.e. either the standard output stream is going to tty, or a pager is in use. We forgot the latter, which has been fixed. * kd/auto-col-with-pager-fix: column: do not include pager.c column: show auto columns when pager is active --- e18b1df299a82c8edc262091dc0b77b1f13c5f0b diff --combined t/t7006-pager.sh index f0f1abd1c2,f630fe0f2b..865168ec6a --- a/t/t7006-pager.sh +++ b/t/t7006-pager.sh @@@ -201,7 -201,7 +201,7 @@@ test_expect_success TTY 'git tag -a res test -e paginated.out ' -test_expect_failure TTY 'git tag as alias ignores pager.tag with -a' ' +test_expect_success TTY 'git tag as alias ignores pager.tag with -a' ' test_when_finished "git tag -d newtag" && rm -f paginated.out && test_terminal git -c pager.tag -c alias.t=tag t -am message newtag && @@@ -239,7 -239,7 +239,7 @@@ test_expect_success 'no color when stdo test_expect_success TTY 'color when writing to a pager' ' rm -f paginated.out && test_config color.ui auto && - test_terminal env TERM=vt100 git log && + test_terminal git log && colorful paginated.out ' @@@ -247,7 -247,7 +247,7 @@@ test_expect_success TTY 'colors are sup rm -f paginated.out && test_config color.ui auto && test_config color.pager false && - test_terminal env TERM=vt100 git log && + test_terminal git log && ! colorful paginated.out ' @@@ -266,7 -266,7 +266,7 @@@ test_expect_success 'color when writin test_expect_success TTY 'colors are sent to pager for external commands' ' test_config alias.externallog "!git log" && test_config color.ui auto && - test_terminal env TERM=vt100 git -p externallog && + test_terminal git -p externallog && colorful paginated.out ' @@@ -570,4 -570,18 +570,18 @@@ test_expect_success 'command with under test_cmp expect actual ' + test_expect_success TTY 'git tag with auto-columns ' ' + test_commit one && + test_commit two && + test_commit three && + test_commit four && + test_commit five && + cat >expect <<-\EOF && + initial one two three four five + EOF + test_terminal env PAGER="cat >actual" COLUMNS=80 \ + git -c column.ui=auto tag --sort=authordate && + test_cmp expect actual + ' + test_done