Ævar Arnfjörð Bjarmason [off-list ref] writes:
We then use that to check if we set it up ourselves and skip setting it
up, but any other program invoked by us will be fooled by
GIT_PAGER_IN_USE=true. Maybe that's intentional,...
I think there is no other reason than to ensure subprocesses we
spawn (be it git or somebody else that will later spawn git) are
affected; otherwise a global variable in environment.c would have
sufficed.
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.
On Mon, Nov 22, 2021 at 10:00:19AM -0800, Junio C Hamano wrote:
quoted
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