Code

grep: run setup_git_directory_gently() sooner
[git.git] / t / t7006-pager.sh
index 43b310218ae7a4b17e66f3b5949cf42218da07c8..bb9533581ebaf57eb2f4904dcd41d13b85e78270 100755 (executable)
@@ -106,6 +106,19 @@ test_expect_success TTY 'no pager with --no-pager' '
        ! test -e paginated.out
 '
 
+test_expect_success TTY 'configuration can disable pager' '
+       rm -f paginated.out &&
+       test_might_fail git config --unset pager.grep &&
+       test_terminal git grep initial &&
+       test -e paginated.out &&
+
+       rm -f paginated.out &&
+       git config pager.grep false &&
+       test_when_finished "git config --unset pager.grep" &&
+       test_terminal git grep initial &&
+       ! test -e paginated.out
+'
+
 # A colored commit log will begin with an appropriate ANSI escape
 # for the first color; the text "commit" comes later.
 colorful() {