The previous patch introduced `pager.tag.list`. Its default was to use
the value of `pager.tag` or, if that was also not set, to fall back to
"off".

Change that fallback value to "on". Let the default value for
`pager.tag` remain at "off". Update documentation and tests.

Signed-off-by: Martin Ågren <martin.ag...@gmail.com>
---
 Documentation/git-tag.txt |  2 +-
 builtin/tag.c             |  2 +-
 t/t7006-pager.sh          | 12 ++++++------
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt
index 6ad5811a2..fbdfb3f59 100644
--- a/Documentation/git-tag.txt
+++ b/Documentation/git-tag.txt
@@ -103,7 +103,7 @@ as `--contains` is provided. See the documentation for each 
of those
 options for details.
 +
 When determining whether to use a pager, `pager.tag.list` is considered
-before `pager.tag`.
+before `pager.tag`. If neither is set, the default is to use a pager.
 See linkgit:git-config[1].
 
 --sort=<key>::
diff --git a/builtin/tag.c b/builtin/tag.c
index e96ef7d70..ec69fca61 100644
--- a/builtin/tag.c
+++ b/builtin/tag.c
@@ -447,7 +447,7 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
        argc = parse_options(argc, argv, prefix, options, git_tag_usage, 0);
 
        if (cmdmode == 'l')
-               setup_auto_pager("tag.list", 0);
+               setup_auto_pager("tag.list", 1);
        setup_auto_pager("tag", 0);
 
        if (keyid) {
diff --git a/t/t7006-pager.sh b/t/t7006-pager.sh
index ed34c6734..94df89a5f 100755
--- a/t/t7006-pager.sh
+++ b/t/t7006-pager.sh
@@ -134,22 +134,22 @@ test_expect_success TTY 'configuration can enable pager 
(from subdir)' '
        }
 '
 
-test_expect_success TTY 'git tag -l defaults to not paging' '
+test_expect_success TTY 'git tag -l defaults to paging' '
        rm -f paginated.out &&
        test_terminal git tag -l &&
-       ! test -e paginated.out
+       test -e paginated.out
 '
 
 test_expect_success TTY 'git tag -l respects pager.tag' '
        rm -f paginated.out &&
-       test_terminal git -c pager.tag tag -l &&
-       test -e paginated.out
+       test_terminal git -c pager.tag=false tag -l &&
+       ! test -e paginated.out
 '
 
 test_expect_success TTY 'git tag -l respects pager.tag.list' '
        rm -f paginated.out &&
-       test_terminal git -c pager.tag=false -c pager.tag.list tag -l &&
-       test -e paginated.out
+       test_terminal git -c pager.tag -c pager.tag.list=false tag -l &&
+       ! test -e paginated.out
 '
 
 test_expect_success TTY 'git tag -l respects --no-pager' '
-- 
2.13.2.653.gfb5159d

Reply via email to