Thread (1 message) 1 message, 1 author, 2016-06-15

Re: Should "git help" respect the 'pager' setting?

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:57:32

John Keeping [off-list ref] writes:
On Thu, May 30, 2013 at 10:38:59PM +0530, Ramkumar Ramachandra wrote:
quoted
Matthieu Moy wrote:
quoted
I find it a bit weird that Git sets the configuration for external
commands, but it may make sense. No strong opinion here.
I don't mean a setenv() kind of thing: how would we unset it after
that?  Perhaps something like execvpe(), passing in the environment as
an argument?
Running "man" is the last thing we do before exitting "git help" and
exec_man_man() does seem to do execlp(), so I do not see it as an
issue.
Overriding PAGER might make sense, but I'd be quite annoyed if Git
decided to override MANPAGER without providing some way to override it.
Hmm, see below.
If a user sets MANPAGER then it's because they want a specific pager
when reading man pages - invoking man through "git help" shouldn't cause
it to behave differently in this case.
True, and for that matter, if the user sets PAGER to use with
non-Git (including manual pages) and also sets GIT_PAGER to use
specifically with Git, the user would be annoyed if we passed
formatted manual pages to GIT_PAGER by exporting PAGER (or driving
"man" with its "-P" option).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help