rebase: strip unused code in git-rebase--preserve-merges.sh
[gitweb.git] / git-rebase--interactive.sh
index a60df2ee5a0806477872fbe4db700e80cfb5f43d..2f4941d0fc95270f0b723eaed8f69d506ee69a27 100644 (file)
@@ -162,6 +162,12 @@ s, squash <commit> = use commit, but meld into previous commit
 f, fixup <commit> = like \"squash\", but discard this commit's log message
 x, exec <commit> = run command (the rest of the line) using shell
 d, drop <commit> = remove commit
+l, label <label> = label current HEAD with a name
+t, reset <label> = reset HEAD to a label
+m, merge [-C <commit> | -c <commit>] <label> [# <oneline>]
+.       create a merge commit using the original merge commit's
+.       message (or the oneline, if no original merge commit was
+.       specified). Use -c <commit> to reword the commit message.
 
 These lines can be re-ordered; they are executed from top to bottom.
 " | git stripspace --comment-lines >>"$todo"
@@ -888,6 +894,8 @@ init_revisions_and_shortrevisions () {
        else
                revisions=$onto...$orig_head
                shortrevisions=$shorthead
+               test -z "$squash_onto" ||
+               echo "$squash_onto" >"$state_dir"/squash-onto
        fi
 }
 
@@ -942,7 +950,7 @@ EOF
        die "Could not skip unnecessary pick commands"
 
        checkout_onto
-       if test -z "$rebase_root" && test ! -d "$rewritten"
+       if test ! -d "$rewritten"
        then
                require_clean_work_tree "rebase"
                exec git rebase--helper ${force_rebase:+--no-ff} $allow_empty_message \
@@ -964,6 +972,8 @@ git_rebase__interactive () {
        init_revisions_and_shortrevisions
 
        git rebase--helper --make-script ${keep_empty:+--keep-empty} \
+               ${rebase_merges:+--rebase-merges} \
+               ${rebase_cousins:+--rebase-cousins} \
                $revisions ${restrict_revision+^$restrict_revision} >"$todo" ||
        die "$(gettext "Could not generate todo list")"