Thread (29 messages) 29 messages, 2 authors, 2025-09-22

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

From: Kristoffer Haugsbakk <hidden>
Date: 2025-09-11 16:49:42

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 <redacted>
[snip the diff]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help