return
;;
1)
- test -d "$GIT_DIR/rr-cache" && git rerere
+ git rerere
die "$RESOLVEMSG"
;;
2)
--skip)
if test -d "$dotest"
then
- if test -d "$GIT_DIR/rr-cache"
- then
- git rerere clear
- fi
+ git rerere clear
prev_head="`cat $dotest/prev_head`"
end="`cat $dotest/end`"
msgnum="`cat $dotest/msgnum`"
exit
;;
--abort)
- if test -d "$GIT_DIR/rr-cache"
- then
- git rerere clear
- fi
+ git rerere clear
if test -d "$dotest"
then
rm -r "$dotest"
# Now we are rebasing commits $upstream..$branch on top of $onto
-# Check if we are already based on $onto, but this should be
-# done only when upstream and onto are the same.
+# Check if we are already based on $onto with linear history,
+# but this should be done only when upstream and onto are the same.
mb=$(git merge-base "$onto" "$branch")
-if test "$upstream" = "$onto" && test "$mb" = "$onto"
+if test "$upstream" = "$onto" && test "$mb" = "$onto" &&
+ # linear history?
+ ! git rev-list --parents "$onto".."$branch" | grep " .* " > /dev/null
then
echo >&2 "Current branch $branch_name is up to date."
exit 0