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

Re: [PATCH v2] add-patch: edit the hunk again

From
Rubén Justo <rjusto@gmail.com>
Date
Oct 2, 2024, 16:36 UTC
Message-ID
<b1408033-5366-4e2f-823f-7957a9f30fe9@gmail.com>
In-Reply-To
<556ba87e-1eee-438d-848f-bbc5558289fe@gmail.com>
On Tue, Oct 01, 2024 at 11:02:53AM +0100, Phillip Wood wrote:
> I'd argue that users who are not familiar with (e)dit are more likely to
> make mistakes when editing hunks and are less likely to be able to fix them.

This series is not about making errors more descriptive or making (e)dit more (or less) accessible.

Editing the original hunk is already quite challenging and prone to errors.

This series is about regaining the possibility for the user to see and correct their mistakes.

Show 10 quoted lines
> > > This is still missing "n q". Apart from that the test is looking good.
> > 
> > I've been resisting the idea of "completeness", because I think "e y"
> > should also be fine.  But I'm not going to resist anymore here :-),
> > since I don't think the test has much more value without "n q".  So
> > I'll add it.
> 
> The reason I think we should have it is that the tests ought to be testing
> realistic user input and not rely on getting EOF which is unlikely to happen
> in real life.

Sometimes, I use ctrl+d instead of 'q'. So, some of my interactive "add -p" sessions can be described better with "y" than with "y q" or "y n... q". And I'm real ;-)

Of course, non-interactively: "e y" or "y" work as expected as the test in this series and others in t3701 demonstrate.

Since we already have other tests, I didn't mind adding "n q" in an attempt to move the series forward.

Previous: Phillip WoodNext: Rubén Justo
Message 12 of 17 in “add-patch: edit the hunk again”
  1. add-patch: edit the hunk againRubén Justo, Sep 15, 2024
  2. Phillip WoodSep 16, 2024
  3. Junio C HamanoSep 16, 2024
  4. Rubén JustoSep 16, 2024
  5. phillip.wood123@gmail.comSep 18, 2024
  6. Rubén JustoSep 18, 2024
  7. add-patch: edit the hunk againRubén Justo, Sep 18, 2024
  8. phillip.wood123@gmail.comSep 23, 2024
  9. Junio C HamanoSep 23, 2024
  10. Rubén JustoSep 24, 2024
  11. Phillip WoodOct 1, 2024
  12. Rubén JustoOct 2, 2024
  13. add-patch: edit the hunk againRubén Justo, Sep 28, 2024
  14. Phillip WoodOct 1, 2024
  15. Junio C HamanoOct 1, 2024
  16. Rubén JustoOct 2, 2024
  17. Rubén JustoOct 2, 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.