Imported Upstream version 2.13.3
[platform/upstream/git.git] / git-rebase.sh
index 44ede36..2cf73b8 100755 (executable)
@@ -34,6 +34,7 @@ root!              rebase all reachable commits up to the root(s)
 autosquash         move commits that begin with squash!/fixup! under -i
 committer-date-is-author-date! passed to 'git am'
 ignore-date!       passed to 'git am'
+signoff            passed to 'git am'
 whitespace=!       passed to 'git apply'
 ignore-whitespace! passed to 'git apply'
 C=!                passed to 'git apply'
@@ -43,9 +44,9 @@ continue!          continue
 abort!             abort and check out the original branch
 skip!              skip current patch and continue
 edit-todo!         edit the todo list during an interactive rebase
+quit!              abort but keep HEAD where it is
 "
 . git-sh-setup
-. git-sh-i18n
 set_reflog_action rebase
 require_work_tree_exists
 cd_to_toplevel
@@ -154,7 +155,7 @@ move_to_original_branch () {
                git symbolic-ref \
                        -m "rebase finished: returning to $head_name" \
                        HEAD $head_name ||
-               die "$(gettext "Could not move back to $head_name")"
+               die "$(eval_gettext "Could not move back to \$head_name")"
                ;;
        esac
 }
@@ -165,14 +166,14 @@ apply_autostash () {
                stash_sha1=$(cat "$state_dir/autostash")
                if git stash apply $stash_sha1 2>&1 >/dev/null
                then
-                       echo "$(gettext 'Applied autostash.')"
+                       echo "$(gettext 'Applied autostash.')" >&2
                else
                        git stash store -m "autostash" -q $stash_sha1 ||
                        die "$(eval_gettext "Cannot store \$stash_sha1")"
                        gettext 'Applying autostash resulted in conflicts.
 Your changes are safe in the stash.
 You can run "git stash pop" or "git stash drop" at any time.
-'
+' >&2
                fi
        fi
 }
@@ -242,7 +243,7 @@ do
        --verify)
                ok_to_skip_pre_rebase=
                ;;
-       --continue|--skip|--abort|--edit-todo)
+       --continue|--skip|--abort|--quit|--edit-todo)
                test $total_argc -eq 2 || usage
                action=${1##--}
                ;;
@@ -321,7 +322,7 @@ do
        --ignore-whitespace)
                git_am_opt="$git_am_opt $1"
                ;;
-       --committer-date-is-author-date|--ignore-date)
+       --committer-date-is-author-date|--ignore-date|--signoff|--no-signoff)
                git_am_opt="$git_am_opt $1"
                force_rebase=t
                ;;
@@ -400,6 +401,9 @@ abort)
        finish_rebase
        exit
        ;;
+quit)
+       exec rm -rf "$state_dir"
+       ;;
 edit-todo)
        run_specific_rebase
        ;;
@@ -449,7 +453,7 @@ then
                then
                        . git-parse-remote
                        error_on_missing_default_upstream "rebase" "rebase" \
-                               "against" "git rebase <branch>"
+                               "against" "git rebase $(gettext '<branch>')"
                fi
 
                test "$fork_point" = auto && fork_point=t