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:34 UTC
Message-ID
<ee33072c-8759-4c42-ad36-3c33ef5d1c57@gmail.com>
In-Reply-To
<xmqqv7ybyabs.fsf@gitster.g>
On Tue, Oct 01, 2024 at 10:58:15AM -0700, Junio C Hamano wrote:
> I would not
> complain if we offered the feature to re-edit
I'm using this:
   $ GIT_EDITOR='bash -c "vim \"$1\" && cp -f $1 /tmp/backup"' git add -p

That way, I have a copy of the edited hunk in case I want to try again or review it. In that case, I can simply try again and reload from "/tmp/backup".

I'm sure there's a more clever way, but I haven't come up with anything more elegant.

Maybe interactive.editor, apply.editor, add.editor?
Previous: Junio C HamanoNext: Rubén Justo
Message 16 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.