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:15:09 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-08-16 02:57:41 (GMT)
commit3ba7e6e29afd67e69ff5963d8ed76728824959a0 (patch)
tree896e7b8b62d1ce6aed4b07be408fdc01e6d6223b /t/t7006-pager.sh
parent2cb60093e6c6b53cfc8ffe75f697386a1adab778 (diff)
downloadgit-3ba7e6e29afd67e69ff5963d8ed76728824959a0.zip
git-3ba7e6e29afd67e69ff5963d8ed76728824959a0.tar.gz
git-3ba7e6e29afd67e69ff5963d8ed76728824959a0.tar.bz2
config: run setup_git_directory_gently() sooner
For the pager choice (and the choice to paginate) to reflect the current repository configuration, the repository needs to be located first. 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.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t7006-pager.sh b/t/t7006-pager.sh
index 1890c65..017565f 100755
--- a/t/t7006-pager.sh
+++ b/t/t7006-pager.sh
@@ -134,6 +134,14 @@ test_expect_success TTY 'configuration can disable pager' '
! test -e paginated.out
'
+test_expect_success 'git config uses a pager if configured to' '
+ rm -f paginated.out &&
+ git config pager.config true &&
+ test_when_finished "git config --unset pager.config" &&
+ test_terminal git config --list &&
+ test -e paginated.out
+'
+
test_expect_success 'configuration can enable pager (from subdir)' '
rm -f paginated.out &&
mkdir -p subdir &&