diff options
Diffstat (limited to 'git-rebase.sh')
-rwxr-xr-x | git-rebase.sh | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/git-rebase.sh b/git-rebase.sh index 04f6e44bc8..6344e8d5e3 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -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,6 +44,7 @@ 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 set_reflog_action rebase @@ -53,9 +55,10 @@ LF=' ' ok_to_skip_pre_rebase= resolvemsg=" -$(gettext 'When you have resolved this problem, run "git rebase --continue". -If you prefer to skip this patch, run "git rebase --skip" instead. -To check out the original branch and stop rebasing, run "git rebase --abort".') +$(gettext 'Resolve all conflicts manually, mark them as resolved with +"git add/rm <conflicted_files>", then run "git rebase --continue". +You can instead skip this commit: run "git rebase --skip". +To abort and get back to the state before "git rebase", run "git rebase --abort".') " unset onto unset restrict_revision @@ -71,6 +74,7 @@ test "$(git config --bool rebase.stat)" = true && diffstat=t autostash="$(git config --bool rebase.autostash || echo false)" fork_point=auto git_am_opt= +git_format_patch_opt= rebase_root= force_rebase= allow_rerere_autoupdate= @@ -164,14 +168,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 } @@ -241,7 +245,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##--} ;; @@ -320,7 +324,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 ;; @@ -346,6 +350,9 @@ do shift break ;; + *) + usage + ;; esac shift done @@ -399,6 +406,9 @@ abort) finish_rebase exit ;; +quit) + exec rm -rf "$state_dir" + ;; edit-todo) run_specific_rebase ;; @@ -439,6 +449,11 @@ else state_dir="$apply_dir" fi +if test -t 2 && test -z "$GIT_QUIET" +then + git_format_patch_opt="$git_format_patch_opt --progress" +fi + if test -z "$rebase_root" then case "$#" in |