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>
This commit is contained in:
parent
cda2d3c112
commit
f131dd492f
@ -246,6 +246,10 @@ last=`cat "$dotest/last"`
|
|||||||
this=`cat "$dotest/next"`
|
this=`cat "$dotest/next"`
|
||||||
if test "$skip" = t
|
if test "$skip" = t
|
||||||
then
|
then
|
||||||
|
if test -d "$GIT_DIR/rr-cache"
|
||||||
|
then
|
||||||
|
git-rerere clear
|
||||||
|
fi
|
||||||
this=`expr "$this" + 1`
|
this=`expr "$this" + 1`
|
||||||
resume=
|
resume=
|
||||||
fi
|
fi
|
||||||
@ -408,6 +412,10 @@ do
|
|||||||
stop_here_user_resolve $this
|
stop_here_user_resolve $this
|
||||||
fi
|
fi
|
||||||
apply_status=0
|
apply_status=0
|
||||||
|
if test -d "$GIT_DIR/rr-cache"
|
||||||
|
then
|
||||||
|
git rerere
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -139,6 +139,10 @@ do
|
|||||||
--skip)
|
--skip)
|
||||||
if test -d "$dotest"
|
if test -d "$dotest"
|
||||||
then
|
then
|
||||||
|
if test -d "$GIT_DIR/rr-cache"
|
||||||
|
then
|
||||||
|
git-rerere clear
|
||||||
|
fi
|
||||||
prev_head="`cat $dotest/prev_head`"
|
prev_head="`cat $dotest/prev_head`"
|
||||||
end="`cat $dotest/end`"
|
end="`cat $dotest/end`"
|
||||||
msgnum="`cat $dotest/msgnum`"
|
msgnum="`cat $dotest/msgnum`"
|
||||||
@ -157,6 +161,10 @@ do
|
|||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
--abort)
|
--abort)
|
||||||
|
if test -d "$GIT_DIR/rr-cache"
|
||||||
|
then
|
||||||
|
git-rerere clear
|
||||||
|
fi
|
||||||
if test -d "$dotest"
|
if test -d "$dotest"
|
||||||
then
|
then
|
||||||
rm -r "$dotest"
|
rm -r "$dotest"
|
||||||
|
Loading…
Reference in New Issue
Block a user