diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-09-10 11:02:48 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-09-10 11:02:48 +0300 |
commit | 702239d049dbd95f55c898c4707a3615b0237abd (patch) | |
tree | c77f7bc2a204ed15d5fbe18068584cb898e9ad1d /builtin | |
parent | c2a3bb47f0a5cf8537b3d79cd01b11a5726afb02 (diff) | |
parent | 595d59e2b53a19f8c5c277348e4e1a07bb913ba4 (diff) |
Merge branch 'ma/pager-per-subcommand-action' into maint
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.
If this works out OK, I think there are low-hanging fruits in
other commands like "git branch" that outputs long list in one mode
while taking input in another.
* 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.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/tag.c b/builtin/tag.c index 66e35b823b..7a70d5a9bb 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); |