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

Re: [PATCH] git-add-interactive: edit current file in editor

From
Jacob Keller <jacob.keller@gmail.com>
Date
Jul 28, 2015, 05:12 UTC
Message-ID
<CA+P7+xptro_1nePQbQtGtRc-a9=swXvZiERDCiQc=NReUsV53Q@mail.gmail.com>
In-Reply-To
<1438040482-4599-1-git-send-email-siadat@gmail.com>
On Mon, Jul 27, 2015 at 4:41 PM, Sina Siadat <siadat@gmail.com> wrote:
Show 14 quoted lines
> Adds a new option 'o' to the 'add -p' command that lets you open and edit the
> current file.
>
> The existing 'e' mode is used to manually edit the hunk.  The new 'o' option
> allows you to open and edit the file without having to quit the loop. The hunks
> are updated when the editing is done, and the user will be able to review the
> updated hunks.  Without this option you would have to quit the loop, edit the
> file, and execute 'add -p filename' again.
>
> I would appreciate it if you could let me know what you think about this
> option. I will write more tests if there is any interest at all.
>
> Thank you. :)
>

Absolutely want and would use this change every day. My standard model of commit flow is:

hack commit hack commit hack commit
rest head
add -i ; commit
add -i ; commit

and sometimes I end up with code that I need to actually change, not just edit diff hunks for, but change in the final file. This would make my flow way easier, especially as I could manage hunks while editing files.

Regards, Jake

Previous: Sina SiadatNext: Eric Sunshine
Message 2 of 3 in “git-add-interactive: edit current file in editor”
  1. git-add-interactive: edit current file in editorSina Siadat, Jul 27, 2015
  2. Jacob KellerJul 28, 2015
  3. Eric SunshineJul 29, 2015

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.