Subject: Re: [PATCH v2] pager: fix crash when pager program doesn't exist

From: Junio C Hamano <[email-masked]>
Date: Mon, 22 Nov 2021 10:00:19 -0800

Ævar Arnfjörð Bjarmason <[email-masked]> 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.