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

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

From
Rubén Justo <rjusto@gmail.com>
Date
Oct 2, 2024, 17:27 UTC
Message-ID
<2ed4f980-a294-4a39-9c74-f63ce9af1f70@gmail.com>
In-Reply-To
<9c7af640-ee3a-4a17-84f6-f56fee7efe37@gmail.com>
On Tue, Oct 01, 2024 at 11:03:10AM +0100, Phillip Wood wrote:
> I'm afraid I still don't think that changing the default is a good idea as
> it is often very difficult to correct a badly edited hunk.
This series isn't about how hard it is to fix a badly edited hunk.
> In [1] you say you discarded that idea because the wording was too verbose

Not really. I still believe that regaining the original intention of "no" is a better option than adding new options to the interface.

I am not opposed to that change, I just think it's an unnecessary complication.

A user who experiences problems with a badly edited hunk, edited by themselves, will probably encounter similar issues as they would when editing the original hunk. I think.

I don't think reconstructing a patch is a realistic (sensible) scenario that we should be concerned about.

The small change in the message, in this iteration, adds a bit of clarity for them, I think:

Show 7 quoted lines
> > @@ -1286,11 +1287,17 @@ static int edit_hunk_loop(struct add_p_state *s,
> >   		 * of the word "no" does not start with n.
> >   		 */
> >   		res = prompt_yesno(s, _("Your edited hunk does not apply. "
> > -					"Edit again (saying \"no\" discards!) "
> > +					"Edit again (saying \"no\" discards your edits!) "
> >   					"[y/n]? "));
> 
> [1]
> https://lore.kernel.org/git/6f392446-10b4-4074-a993-97ac444275f8@gmail.com
Previous: Rubén Justo
Message 17 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.