From: Jon Seymour Date: Tue, 14 Jun 2005 13:54:17 GMT Subject: Re: Semantics for one step undo/redo 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 > 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.