Code

Update draft release notes to 1.7.6.6
[git.git] / git-rebase--interactive.sh
old mode 100755 (executable)
new mode 100644 (file)
index 437cc52..c6ba7c1
@@ -168,11 +168,6 @@ pick_one () {
        output git rev-parse --verify $sha1 || die "Invalid commit name: $sha1"
        test -d "$rewritten" &&
                pick_one_preserving_merges "$@" && return
-       if test -n "$rebase_root"
-       then
-               output git cherry-pick "$@"
-               return
-       fi
        output git cherry-pick $ff "$@"
 }
 
@@ -275,7 +270,7 @@ pick_one_preserving_merges () {
                        # No point in merging the first parent, that's HEAD
                        new_parents=${new_parents# $first_parent}
                        if ! do_with_author output \
-                               git merge ${strategy:+-s $strategy} -m \
+                               git merge --no-ff ${strategy:+-s $strategy} -m \
                                        "$msg_content" $new_parents
                        then
                                printf "%s\n" "$msg_content" > "$GIT_DIR"/MERGE_MSG
@@ -515,7 +510,9 @@ do_next () {
        refs/*)
                message="$GIT_REFLOG_ACTION: $head_name onto $shortonto" &&
                git update-ref -m "$message" $head_name $newhead $orig_head &&
-               git symbolic-ref HEAD $head_name
+               git symbolic-ref \
+                 -m "$GIT_REFLOG_ACTION: returning to $head_name" \
+                 HEAD $head_name
                ;;
        esac && {
                test ! -f "$state_dir"/verbose ||
@@ -582,13 +579,6 @@ skip_unnecessary_picks () {
        die "Could not skip unnecessary pick commands"
 }
 
-get_saved_options () {
-       test -d "$rewritten" && preserve_merges=t
-       test -f "$state_dir"/strategy && strategy="$(cat "$state_dir"/strategy)"
-       test -f "$state_dir"/verbose && verbose=t
-       test -f "$state_dir"/rebase-root && rebase_root=t
-}
-
 # Rearrange the todo list that has both "pick sha1 msg" and
 # "pick sha1 fixup!/squash! msg" appears in it so that the latter
 # comes immediately after the former, and change "pick" to
@@ -652,8 +642,6 @@ rearrange_squash () {
 
 case "$action" in
 continue)
-       get_saved_options
-
        # do we have anything to commit?
        if git diff-index --cached --quiet --ignore-submodules HEAD --
        then
@@ -684,8 +672,6 @@ first and then run 'git rebase --continue' again."
        do_rest
        ;;
 skip)
-       get_saved_options
-
        git rerere clear
 
        do_rest
@@ -708,14 +694,6 @@ mkdir "$state_dir" || die "Could not create temporary $state_dir"
 
 : > "$state_dir"/interactive || die "Could not mark as interactive"
 write_basic_state
-case "$rebase_root" in
-'')
-       rm -f "$state_dir"/rebase-root ;;
-*)
-       : >"$state_dir"/rebase-root ;;
-esac
-test -z "$strategy" || echo "$strategy" > "$state_dir"/strategy
-test t = "$verbose" && : > "$state_dir"/verbose
 if test t = "$preserve_merges"
 then
        if test -z "$rebase_root"
@@ -735,7 +713,6 @@ then
        # parents to rewrite and skipping dropped commits would
        # prematurely end our probe
        merges_option=
-       first_after_upstream="$(git rev-list --reverse --first-parent $upstream..$orig_head | head -n 1)"
 else
        merges_option="--no-merges --cherry-pick"
 fi
@@ -768,7 +745,7 @@ do
                        preserve=t
                        for p in $(git rev-list --parents -1 $sha1 | cut -d' ' -s -f2-)
                        do
-                               if test -f "$rewritten"/$p -a \( $p != $onto -o $sha1 = $first_after_upstream \)
+                               if test -f "$rewritten"/$p
                                then
                                        preserve=f
                                fi