Re: [PATCH v2] pager: fix crash when pager program doesn't exist
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 22, 2021, 18:19 UTC
- Message-ID
- <xmqq35nogijg.fsf@gitster.g>
- In-Reply-To
- <xmqqk0h0gjnh.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
> I know $GIT_PAGER trumps core.pager, which indicates between > equivalents, environment is taken as a stronger wish. But I do not > mind if the order were updated to pager.<cmd> trumps $GIT_PAGER, > which in turn trumps core.pager, which in turn trumps $PAGER.
If such a precedence order makes it impossible to override a configured pager.<cmd> value at runtime, then it is a bad idea. But luckily, we can do
git -c "pager.<cmd>=<this one-shot pager>" cmd ...
to override a configured one, so perhaps it is OK.
I tend to agree with opinions I read elsewhere in this thread that it would be better not to do the fallback in the first place, but in this case, what I said I am OK with is when pager.<cmd> is defined, we do not even look at $GIT_PAGER or later choices, which is orthogonal.