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

Re: Semantics for one step undo/redo

From
Jon Seymour <jon.seymour@gmail.com>
Date
Jun 14, 2005, 13:54 UTC
Message-ID
<2cfc4032050614065443119d5f@mail.gmail.com>
In-Reply-To
<2cfc403205061406507af5a66@mail.gmail.com>
Sorry, I omitted an important aspect of REDO Post-conditions - corrected below
Show 17 quoted lines
> REDO Semantics
>     - redo will replay a previous commit but any or all of the tree,
> the parents, the message may be replaced by edited values.
> 
> REDO Pre-conditions:
>     - at least one entry exists in the .git/redo-log
>     - the cache matches the working tree
>     - .nextmsg contains the commit message
>     - HEAD contains the commit id of the current predecessor (which
> may differ from the logged value)
> 
> REDO Post-conditions:
>     - the working tree is committed with .nextmsg as its message, the
> first parent replaced by HEAD and the remaining parents read from .the
> tail of .git/redo-log
>     - .nextmsg is cleared
>     - the last line of .git/redo-log is removed
additional post-conditions:
     - the diff between the old head and its old parent (as read from
the log) is applied to the workspace and cache.
     - if the re-applied diff fails, the workspace and cache are
returned back to the state immediately following the previous commit
and the user has the chance to manually reapply the diffs before
updating the index into a state that allows further redos
jon.
Previous: Jon SeymourNext: Junio C Hamano
Message 2 of 3 in “Semantics for one step undo/redo”
  1. Jon SeymourJun 14, 2005
  2. Jon SeymourJun 14, 2005
  3. Junio C HamanoJun 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.