summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-08-11 13:27:07 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-08-11 13:27:07 -0700
commit297872f0c2a1d97c3e62d8ac9d57bdc218bc1228 (patch)
tree3c16bac54368e29d74d20c92a77757c6adaa4cea /builtin
parentMerge branch 'jk/rev-list-empty-input' (diff)
parentgit.c: ignore pager.* when launching builtin as dashed external (diff)
downloadtgif-297872f0c2a1d97c3e62d8ac9d57bdc218bc1228.tar.xz
Merge branch 'ma/pager-per-subcommand-action'
The "tag.pager" configuration variable was useless for those who actually create tag objects, as it interfered with the use of an editor. A new mechanism has been introduced for commands to enable pager depending on what operation is being carried out to fix this, and then "git tag -l" is made to run pager by default. * ma/pager-per-subcommand-action: git.c: ignore pager.* when launching builtin as dashed external tag: change default of `pager.tag` to "on" tag: respect `pager.tag` in list-mode only t7006: add tests for how git tag paginates git.c: provide setup_auto_pager() git.c: let builtins opt for handling `pager.foo` themselves builtin.h: take over documentation from api-builtin.txt
Diffstat (limited to 'builtin')
-rw-r--r--builtin/tag.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/tag.c b/builtin/tag.c
index e8a30e6110..c627794181 100644
--- a/builtin/tag.c
+++ b/builtin/tag.c
@@ -440,6 +440,9 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
cmdmode = 'l';
}
+ if (cmdmode == 'l')
+ setup_auto_pager("tag", 1);
+
if ((create_tag_object || force) && (cmdmode != 0))
usage_with_options(git_tag_usage, options);