From: Dragan Simic Date: Thu, 23 May 2024 23:03:03 GMT Subject: Re: [PATCH 5/5] add-patch: render hunks through the pager Message-ID: <0b43d5df031aabec48c5ab4fe6436c36@manjaro.org> In-Reply-To: <9d25b8af-a865-4535-b8fb-d518768e00b4@gmail.com> On 2024-05-24 00:25, Rubén Justo wrote: > On Thu, May 23, 2024 at 05:06:01AM -0400, Jeff King wrote: [...] > In addition to that, I have two use-cases that make sense to me: > > - avoiding a huuge but split-able hunk to go all through my terminal > before I can say: split, 's'. For this, perhaps the '-P' suggested > by Dragan is the way to go. A possible UX issue with the "-P" option is that the menu wouldn't be displayed right after executing "git add -P" if the first displayed hunk is longer than one screen, leaving the users wondering what actually happened. Though, that perhaps could be addressed in the documentation. > - a lot of mid-sized hunks that I only need to see, to decide, the > result of "head -3". Here, the pager would be acting as a > 'filter'. > > Perhaps I am stretching the meaning of 'pager' too far... > >> I do still think it would be useful to be able to configure its pager >> separately (in my case, I'd use "less -FX" rather than my default >> setup, which doesn't use either of those options). > > A new "interactive.pager" setting? Perhaps with higher preference than > "add.pager"? Just questioning, do not take this as an intention of > scratching that itch :-) Huh, I see some possible issues with separate pager configurations, resulting from the upcoming rework of the default less(1)-as-pager options, so perhaps it would, in addition, be better to wait until those changes settle first. I intend to get into that rather soon, not only for Git, but also for a few other projects that use less(1) as their pager by default, such as util-linux.