From f131dd492f098f9f565df93df13e35c734284590 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 8 Dec 2006 13:29:56 -0800 Subject: rerere: record (or avoid misrecording) resolved, skipped or aborted rebase/am Data in rr-cache isn't valid after a patch application is skipped or and aborted, so our next commit could be misrecorded as a resolution of that skipped/failed commit, which is wrong. git-am --skip, git-rebase --skip/--abort will automatically invoke git-rerere clear to avoid this. Also, since git-am --resolved indicates a resolution was succesful, remember to run git-rerere to record the resolution (and not surprise the user when the next commit is made). Signed-off-by: Eric Wong Signed-off-by: Junio C Hamano --- git-rebase.sh | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'git-rebase.sh') diff --git a/git-rebase.sh b/git-rebase.sh index 25530dfdc..2b4f3477f 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -139,6 +139,10 @@ do --skip) if test -d "$dotest" then + if test -d "$GIT_DIR/rr-cache" + then + git-rerere clear + fi prev_head="`cat $dotest/prev_head`" end="`cat $dotest/end`" msgnum="`cat $dotest/msgnum`" @@ -157,6 +161,10 @@ do exit ;; --abort) + if test -d "$GIT_DIR/rr-cache" + then + git-rerere clear + fi if test -d "$dotest" then rm -r "$dotest" -- cgit v1.2.1