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

Re: [PATCH] make cg-commit --review restore original tree state afterwards

From
Petr Baudis <pasky@suse.cz>
Date
Oct 27, 2006, 02:02 UTC
Message-ID
<20061027020245.GX20017@pasky.or.cz>
In-Reply-To
<4539EB15.3050405@vilain.net>

Dear diary, on Sat, Oct 21, 2006 at 11:40:37AM CEST, I got a letter where Sam Vilain <sam@vilain.net> said that...

Show 8 quoted lines
> Ok, I ruined the error message.
> 
> This could also do with some enhancement; if you edit hunks of the
> patch, then the numbers in the hunks could be updated so as to not make
> the patch abort.  Also, if it does abort you should get the option of
> undoing everything, or editing the patch again...
> 
> Will try again with this another time.

Actually, on current master you can now use internal_commit. My idea was that you internal_commit with the local changes as X, then rollback to HEAD, apply new patch. If you fail at this point, you can do much saner recovery since you can reset the tree and timewarp back to X and save the modified patch at a suitable place.

Besides, you can just timewarp the tree back to X (w/o updating HEAD) at this point to recover the changes excluded from the committed patch!

I guess timewarping/internal_commit may look like magic to everyone but me so if the above is unclear, just say so and I'll try to be more thorough. :-)

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
Previous: Sam Vilain
Message 3 of 3 in “make cg-commit --review restore original tree state afterwards”
  1. make cg-commit --review restore original tree state afterwardsSam Vilain, Oct 21, 2006
  2. Sam VilainOct 21, 2006
  3. Petr BaudisOct 27, 2006

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.