Re: [PATCH v2] pager: fix crash when pager program doesn't exist
- From
Jeff King <peff@peff.net>
- Date
- Nov 22, 2021, 18:26 UTC
- Message-ID
- <YZvg8xnt0KrjqSgq@coredump.intra.peff.net>
- In-Reply-To
- <xmqqfsrogjf0.fsf@gitster.g>
On Mon, Nov 22, 2021 at 10:00:19AM -0800, Junio C Hamano wrote:
Show 9 quoted lines
> > Presumably we can invoke N git <something>, where those <something> have > > different pager.<something> config... > > A tangent, but pager.<cmd> should be renamed/transitioned to > pager.<cmd>.program, I would think. Not that we allow characters > that are unsafe in the configuration variable names (like dot ".") > in the names of Git subcommands right now, but any name that is > taken from an unbounded set should not appear anywhere but the > second level of a three-level configuration variable name.
It does come up even now for custom commands or aliases. Here's an old discussion of somebody with an underscore:
https://lore.kernel.org/git/20150206124528.GA18859@inner.h.apk.li/
It would also allow other per-pager settings, though I don't off-hand remember any that would be useful. Splitting "enabled" from "command" would be nice, but not that important. Per-pager color.pager settings would potentially be useful, but it's a pretty obscure feature in the first place.
I'm definitely in favor of this in the long term, but I don't think there's any urgency in attaching it to the current discussion (that lack of urgency is why it has gone un-implemented for the past 6 years).
-Peff