From: Phillip Wood Date: Mon, 10 Jun 2024 08:27:49 GMT Subject: Re: [PATCH v3 0/6] use the pager in 'add -p' Message-ID: <1ae0715d-df76-4019-995e-f00f3506f2ac@gmail.com> In-Reply-To: Hi Dragan On 09/06/2024 18:20, Dragan Simic wrote: > On 2024-06-09 16:29, phillip.wood123@gmail.com wrote: > >> Having read the message you referenced I'm struggling to understand >> the use-case for stripping escape codes - what do you want to do with >> the hunk that means you want to remove the color? > > Let me recap, please. > [...] > I hope this makes the whole thing more clear. It is very clear _how_ you think it should work and I agree that makes sense in the context of a generic shell pipeline. What's not clear to me is _why_ that is useful in the context of displaying hunks in "git add -p". The purpose of "git add -p" is to allow the user to interactively stage individual hunks. The "|" command allows the user to display the hunk in a way that helps them decide whether to stage that particular hunk. Are you able to give a specific example of a command that would help you decide whether to stage a particular hunk where you would not want to keep the escape codes? Best Wishes Phillip