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

Re: porcelain question: state of the art for undo-redo?

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Jun 14, 2005, 01:25 UTC
Message-ID
<Pine.LNX.4.21.0506132056210.30848-100000@iabervon.org>
In-Reply-To
<2cfc40320506110151624b3ec1@mail.gmail.com>
On Sat, 11 Jun 2005, Jon Seymour wrote:
Show 7 quoted lines
> What porcelain layer solutions currently exist for effective undo-edit-redo?
> 
> For example, if you are working on a series of patches in a series,
> then realise there is a mistake in a patch early in the series, how
> does one mod that patch, then reapply all the following patches to
> produce a slightly modified patch series with as little stuffing
> around as possible?

I personally commit changes as I make them (essentially, and time I'm about to make a change that might not work out, I commit the previous state). Once I'm completely satisfied with the results, I redo the whole thing as a series of commits from the base as self-contained changes.

To do this, I get a repository which contains the base (as master) and the result of my previous work. Then I repeat the following steps:

Diff the work against the head into a temporary file. Remove all of the hunks I don't want yet from the file. Apply the file. Commit.

I stop when the diff is either empty or contains only junk I didn't actually mean to include.

Then I submit the series thus created.

I generally then diff once more, remove anything I actually don't want to have (as opposed to wanting to have but not submit), apply and commit to form a new work head. Then I throw away the old work head.

If I screw this up, I just start over, since I have all the actual content safe.

	-Daniel
*This .sig left intentionally blank*
Previous: Jon Seymour
Message 2 of 2 in “porcelain question: state of the art for undo-redo?”
  1. Jon SeymourJun 11, 2005
  2. Daniel BarkalowJun 14, 2005

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.