git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jon Seymour <jon.seymour@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Subject: Re: Semantics for one step undo/redo
Date: Tue, 14 Jun 2005 23:54:17 +1000	[thread overview]
Message-ID: <2cfc4032050614065443119d5f@mail.gmail.com> (raw)
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.

  reply	other threads:[~2005-06-14 13:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-14 13:50 Semantics for one step undo/redo Jon Seymour
2005-06-14 13:54 ` Jon Seymour [this message]
2005-06-14 15:01 ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2cfc4032050614065443119d5f@mail.gmail.com \
    --to=jon.seymour@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jon@blackcubes.dyndns.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).