diff options
author | Martin Ågren <martin.agren@gmail.com> | 2017-08-02 21:40:50 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-08-03 11:08:10 -0700 |
commit | c409824cc2abac46e06091fcb29639b048d23b5d (patch) | |
tree | 66d9eb81c2c52507c416bd6e7e81991dc1a1f1fc /argv-array.c | |
parent | builtin.h: take over documentation from api-builtin.txt (diff) | |
download | tgif-c409824cc2abac46e06091fcb29639b048d23b5d.tar.xz |
git.c: let builtins opt for handling `pager.foo` themselves
Before launching a builtin git foo and unless mechanisms with precedence
are in use, we check for and handle the `pager.foo` config. This is done
without considering exactly how git foo is being used, and indeed, git.c
cannot (and should not) know what the arguments to git foo are supposed
to achieve.
In practice this means that, e.g., `git -c pager.tag tag -a new-tag`
results in errors such as "Vim: Warning: Output is not to a terminal"
and a garbled terminal. Someone who makes use of both `git tag -a` and
`git tag -l` will probably not set `pager.tag`, so that `git tag -a`
will actually work, at the cost of not paging output of `git tag -l`.
To allow individual builtins to make more informed decisions about when
to respect `pager.foo`, introduce a flag DELAY_PAGER_CONFIG. If the flag
is set, do not check `pager.foo`.
Do not check for DELAY_PAGER_CONFIG in `execv_dashed_external()`. That
call site is arguably wrong, although in a way that is not yet visible,
and will be changed in a slightly different direction in a later patch.
Don't add any users of DELAY_PAGER_CONFIG just yet, one will follow in a
later patch.
Suggested-by: Jeff King <peff@peff.net>
Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'argv-array.c')
0 files changed, 0 insertions, 0 deletions