Re: [PATCH 5/5] builtin/config: do not spawn pager when printing color codes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 11, 2025, at 15:24, Patrick Steinhardt wrote:
> 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

Double “though”.

> 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/

> 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@xxxxxx>
>[snip the diff]





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux