git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 0/2] improve interactive-patch

From
PWPhillip 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
Previous: Junio C HamanoNext: Junio C Hamano
Message 27 of 42 in “improve interactive-patch”
  1. 0/2 improve interactive-patchRubén Justo, Mar 25, 2024
  2. 1/2 add-patch: introduce 'p' in interactive-patchRubén Justo, Mar 25, 2024
  3. Junio C HamanoMar 25, 2024
  4. Rubén JustoMar 25, 2024
  5. Junio C HamanoMar 25, 2024
  6. 2/2 add-patch: do not print hunks repeatedlyRubén Justo, Mar 25, 2024
  7. Junio C HamanoMar 25, 2024
  8. 0/2 improve interactive-patchRubén Justo, Mar 26, 2024
  9. 1/2 add-patch: introduce 'p' in interactive-patchRubén Justo, Mar 26, 2024
  10. Phillip WoodMar 26, 2024
  11. Rubén JustoMar 26, 2024
  12. Phillip WoodMar 27, 2024
  13. 2/2 add-patch: do not print hunks repeatedlyRubén Justo, Mar 26, 2024
  14. Phillip WoodMar 26, 2024
  15. Rubén JustoMar 26, 2024
  16. Phillip WoodMar 27, 2024
  17. Rubén JustoMar 28, 2024
  18. Phillip WoodMar 26, 2024
  19. Junio C HamanoMar 26, 2024
  20. Rubén JustoMar 26, 2024
  21. Junio C HamanoMar 26, 2024
  22. Rubén JustoMar 26, 2024
  23. Rubén JustoMar 29, 2024
  24. Dragan SimicMar 29, 2024
  25. Rubén JustoMar 30, 2024
  26. Junio C HamanoMar 30, 2024
  27. Phillip WoodMar 27, 2024
  28. Junio C HamanoMar 27, 2024
  29. Phillip WoodMar 27, 2024
  30. Rubén JustoMar 28, 2024
  31. Rubén JustoMar 26, 2024
  32. 0/2 improve interactive-patchRubén Justo, Mar 28, 2024
  33. 1/2 add-patch: introduce 'p' in interactive-patchRubén Justo, Mar 28, 2024
  34. Junio C HamanoMar 28, 2024
  35. 2/2 add-patch: do not print hunks repeatedlyRubén Justo, Mar 28, 2024
  36. Junio C HamanoMar 28, 2024
  37. Rubén JustoMar 29, 2024
  38. 0/2 improve interactive-patchRubén Justo, Mar 29, 2024
  39. 1/2 add-patch: introduce 'p' in interactive-patchRubén Justo, Mar 29, 2024
  40. 2/2 add-patch: do not print hunks repeatedlyRubén Justo, Mar 29, 2024
  41. phillip.wood123@gmail.comMar 29, 2024
  42. Rubén JustoMar 29, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.