summaryrefslogtreecommitdiff
path: root/t/t7006-pager.sh
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-08-06 03:01:37 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-08-11 16:24:01 (GMT)
commit773b69bf7189f5babb26b899b4c35f604cd993c7 (patch)
treeb72bf725b90cd155e11d21ea3fb5205212eb955f /t/t7006-pager.sh
parentee38dfb89ef88a3e4e6818b7cfe31d122a1c640d (diff)
downloadgit-773b69bf7189f5babb26b899b4c35f604cd993c7.zip
git-773b69bf7189f5babb26b899b4c35f604cd993c7.tar.gz
git-773b69bf7189f5babb26b899b4c35f604cd993c7.tar.bz2
shortlog: run setup_git_directory_gently() sooner
shortlog already runs a repository search unconditionally; running such a search earlier is not very risky. Without this change, the “[pager] shortlog” configuration is not respected at all: “git shortlog” unconditionally paginates. The tests are a bit slow. Running the full battery like this for all built-in commands would be counterproductive; the intent is rather to test shortlog as a representative example command using ..._gently(). 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.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t7006-pager.sh b/t/t7006-pager.sh
index 71d3cef..43b3102 100755
--- a/t/t7006-pager.sh
+++ b/t/t7006-pager.sh
@@ -369,4 +369,13 @@ test_GIT_PAGER_overrides expect_success test_must_fail 'git -p'
test_doesnt_paginate expect_failure test_must_fail 'git -p nonsense'
+test_pager_choices 'git shortlog'
+test_expect_success 'setup: configure shortlog not to paginate' '
+ git config pager.shortlog false
+'
+test_doesnt_paginate expect_success 'git shortlog'
+test_no_local_config_subdir expect_success 'git shortlog'
+test_default_pager expect_success 'git -p shortlog'
+test_core_pager_subdir expect_success 'git -p shortlog'
+
test_done