aboutsummaryrefslogtreecommitdiff
path: root/git-am.sh
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2006-12-08 13:29:56 -0800
committerJunio C Hamano <junkio@cox.net>2006-12-09 11:13:36 -0800
commitf131dd492f098f9f565df93df13e35c734284590 (patch)
treec120eff1e594acc4a6e5487b23e48a83c1f8060b /git-am.sh
parentcda2d3c112a03079af9019c7d6617e65ab88ae7e (diff)
downloadgit-f131dd492f098f9f565df93df13e35c734284590.tar.gz
git-f131dd492f098f9f565df93df13e35c734284590.tar.xz
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 <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-am.sh')
-rwxr-xr-xgit-am.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/git-am.sh b/git-am.sh
index afe322b20..5df6787a3 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -246,6 +246,10 @@ last=`cat "$dotest/last"`
this=`cat "$dotest/next"`
if test "$skip" = t
then
+ if test -d "$GIT_DIR/rr-cache"
+ then
+ git-rerere clear
+ fi
this=`expr "$this" + 1`
resume=
fi
@@ -408,6 +412,10 @@ do
stop_here_user_resolve $this
fi
apply_status=0
+ if test -d "$GIT_DIR/rr-cache"
+ then
+ git rerere
+ fi
;;
esac