Re: [PATCH 5/5] builtin/config: do not spawn pager when printing color codes
On Thu, Sep 11, 2025, at 15:24, Patrick Steinhardt wrote:
Show 6 quoted lines
> With `git config get --type=color` the user asks us to parse a specific
> configuration key and turn the value into an ANSI color escape sequence.
> The printed string can then for example be used as part of shell scripts
> to reuse the same colors as Git.
>
> Right now though we set up the auto-pager though, which means that the
> string may instead be written to the pager command. This is of course
> quite nonsensical: there shouldn't be any use case where the color code
IMO s/:/;/
s/use case/use-case/
Show 7 quoted lines
> should end up in the pager instead of in the TTY.
>
> Fix this by disabling the pager in case the user is asking us to print
> color sequences.
>
> Signed-off-by: Patrick Steinhardt <ps@pks.im>
>[snip the diff]