Re: [PATCH 2/3] setup_pager: set MORE=R
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 17, 2014, 19:17 UTC
- Message-ID
- <xmqqvbxiwh8y.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <20140117042153.GB23443@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 15 quoted lines
> diff --git a/pager.c b/pager.c
> index 90d237e..2303164 100644
> --- a/pager.c
> +++ b/pager.c
> @@ -87,6 +87,10 @@ void setup_pager(void)
> argv_array_push(&env, "LESS=FRSX");
> if (!getenv("LV"))
> argv_array_push(&env, "LV=-c");
> +#ifdef PAGER_MORE_UNDERSTANDS_R
> + if (!getenv("MORE"))
> + argv_array_push(&env, "MORE=R");
> +#endif
> pager_process.env = argv_array_detach(&env, NULL);
>
> if (start_command(&pager_process))Let me repeat from $gmane/240110:
- Can we generalize this a bit so that a builder can pass a list of var=val pairs and demote the existing LESS=FRSX to just a canned setting of such a mechanism?
As we need to maintain this "set these environments when unset" here and also in git-sh-setup.sh, I think it is about time to do that clean-up. Duplicating two settings was borderline OK, but seeing the third added fairly soon after the second was added tells me that the clean-up must come before adding the third.