]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git-rebase.sh
Use GIT_REFLOG_ACTION environment variable instead.
[thirdparty/git.git] / git-rebase.sh
index 546fa446fc3c6c63488b9ef38cb5bdc960953cb1..5c7c4a69019ec866fc2dd4e38b9523aa7e4f20df 100755 (executable)
@@ -28,6 +28,7 @@ Example:       git-rebase master~1 topic
   D---E---F---G master          D---E---F---G master
 '
 . git-sh-setup
+set_reflog_action rebase
 
 RESOLVEMSG="
 When you have resolved this problem run \"git rebase --continue\".
@@ -132,13 +133,16 @@ do
                        finish_rb_merge
                        exit
                fi
-               git am --resolved --3way --resolvemsg="$RESOLVEMSG" \
-                       --reflog-action=rebase
+               git am --resolved --3way --resolvemsg="$RESOLVEMSG"
                exit
                ;;
        --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`"
@@ -152,11 +156,14 @@ do
                        finish_rb_merge
                        exit
                fi
-               git am -3 --skip --resolvemsg="$RESOLVEMSG" \
-                       --reflog-action=rebase
+               git am -3 --skip --resolvemsg="$RESOLVEMSG"
                exit
                ;;
        --abort)
+               if test -d "$GIT_DIR/rr-cache"
+               then
+                       git-rerere clear
+               fi
                if test -d "$dotest"
                then
                        rm -r "$dotest"
@@ -284,6 +291,7 @@ then
 fi
 
 # Rewind the head to "$onto"; this saves our current head in ORIG_HEAD.
+echo "First, rewinding head to replay your work on top of it..."
 git-reset --hard "$onto"
 
 # If the $onto is a proper descendant of the tip of the branch, then
@@ -297,20 +305,10 @@ fi
 if test -z "$do_merge"
 then
        git-format-patch -k --stdout --full-index --ignore-if-in-upstream "$upstream"..ORIG_HEAD |
-       git am --binary -3 -k --resolvemsg="$RESOLVEMSG" \
-               --reflog-action=rebase
+       git am --binary -3 -k --resolvemsg="$RESOLVEMSG"
        exit $?
 fi
 
-if test "@@NO_PYTHON@@" && test "$strategy" = "recursive-old"
-then
-       die 'The recursive-old merge strategy is written in Python,
-which this installation of git was not configured with.  Please consider
-a different merge strategy (e.g. recursive, resolve, or stupid)
-or install Python and git with Python support.'
-
-fi
-
 # start doing a rebase with git-merge
 # this is rename-aware if the recursive (default) strategy is used