Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-08-06 07:06:39 +0400
committerJunio C Hamano <gitster@pobox.com>2010-08-11 20:24:26 +0400
commitff38d1a9953b3bce7741f8f962c5e067fda2d9ea (patch)
treeaec778e283505a8d9194be1461f3b698eb813e27 /t/t7006-pager.sh
parent773b69bf7189f5babb26b899b4c35f604cd993c7 (diff)
grep: run setup_git_directory_gently() sooner
git grep already runs a repository search unconditionally, even when the --no-index option is supplied; running such a search earlier is not very risky. Just like with shortlog, without this change, the “[pager] grep” configuration is not respected at all. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7006-pager.sh')
-rwxr-xr-xt/t7006-pager.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t7006-pager.sh b/t/t7006-pager.sh
index 43b310218a..bb9533581e 100755
--- a/t/t7006-pager.sh
+++ b/t/t7006-pager.sh
@@ -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() {