Re: [PATCH v2 0/2] improve interactive-patch
- From
- Phillip Wood <phillip.wood123@gmail.com>
- Date
- Mar 27, 2024, 11:14 UTC
- Message-ID
- <8a05d7f7-6d94-4228-9507-d3af44f100e7@gmail.com>
- In-Reply-To
- <xmqq5xx9dn6q.fsf@gitster.g>
Hi Junio
On 26/03/2024 15:31, Junio C Hamano wrote:
Show 7 quoted lines
> Phillip Wood <phillip.wood123@gmail.com> writes: >> I think this is a good idea, I've left a few comments on the patches. > > Thanks for your reviews. You raised very good points, all of which > I agree with. 'r'edisplay may work well (and I wonder "r | less" or > piping the hunk display to anything in general would be a useful > future enhancement).
It would certainly be nice to have some way of paging the output in the future.
Show 10 quoted lines
> Response to an unrecognised command should > probably be a two-step process (a short "'h' is not understood. type > ? for help" with list of commands upon request). > > I however am unsure about omitting 'p' from the list when we did not > skip. We do omit 'k' when we have NO previous hunk to go back to, > but that is because we cannot do it even if we were asked to and the > only possible outcome is an error message. That is quite different > from 'p' where we can always show the current hunk when asked, even > if it is just after we have shown it already.
I agree there is a difference between omitting a key that simply does not work because there is no previous hunk to omitting 'p'. My reasoning was that 'p' does not do anything useful for the user, if they press it they end up with exactly the same content being printed to the screen and so I think it clutters up the prompt. I do think though that if the user happens to press 'p' when it is not in the prompt then we should just re-display the current hunk rather than printing an error.
Best Wishes
Phillip