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

Re: git-am and workflow question

From
Junio C Hamano <junkio@cox.net>
Date
Feb 8, 2007, 22:49 UTC
Message-ID
<7vveicxo23.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<9A55745B-03D2-47B3-8359-FF2D9575502E@kernel.crashing.org>
Kumar Gala <galak@kernel.crashing.org> writes:
Show 11 quoted lines
> Thanks.  Have there been any thoughts on having git-am apply the patch
> and then let the user do some modifications before the commit?   I
> kinda did this by hand by doing the following:
>
> git-am -i ...
> < suspend >
> patch -p1 < .dotest/patch
> < modify >
> git-diff > .dotest/patch
> < cleanup >
> < resume >

If you are using "am -i", I think the above is already there (I mean, you should not have to do ^Z where you write <suspend>). When you get the interactive prompt:

	Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all 
I think you can edit $dotest/patch in whatever way.

However, if I were to do bulk application _with_ incremental fixup (which I think is a combination that would not work very well for the way I work, though), I would probably have two windows (I work inside "screen", so I would use two screens), and run "am -i" in one and run shell in the other. Normally I would just say 'y' to the prompt, and after applying something I might want to do fixups, I would go to the shell, do fixups and "commit --amend", come back and let "am -i" to continue with the next patch.

Previous: Kumar GalaNext: Michael S. Tsirkin
Message 4 of 7 in “git-am and workflow question”
  1. Kumar GalaFeb 8, 2007
  2. Junio C HamanoFeb 8, 2007
  3. Kumar GalaFeb 8, 2007
  4. Junio C HamanoFeb 8, 2007
  5. Michael S. TsirkinFeb 10, 2007
  6. Junio C HamanoFeb 11, 2007
  7. Jakub NarebskiFeb 8, 2007

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.