diff options
Diffstat (limited to 'git-rebase--am.sh')
-rw-r--r-- | git-rebase--am.sh | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/git-rebase--am.sh b/git-rebase--am.sh new file mode 100644 index 0000000000..263987c55d --- /dev/null +++ b/git-rebase--am.sh @@ -0,0 +1,34 @@ +#!/bin/sh +# +# Copyright (c) 2010 Junio C Hamano. +# + +. git-sh-setup + +case "$action" in +continue) + git am --resolved --3way --resolvemsg="$resolvemsg" && + move_to_original_branch + exit + ;; +skip) + git am --skip -3 --resolvemsg="$resolvemsg" && + move_to_original_branch + exit + ;; +esac + +test -n "$rebase_root" && root_flag=--root + +git format-patch -k --stdout --full-index --ignore-if-in-upstream \ + --src-prefix=a/ --dst-prefix=b/ \ + --no-renames $root_flag "$revisions" | +git am $git_am_opt --rebasing --resolvemsg="$resolvemsg" && +move_to_original_branch +ret=$? +test 0 != $ret -a -d "$state_dir" && + echo $head_name > "$state_dir/head-name" && + echo $onto > "$state_dir/onto" && + echo $orig_head > "$state_dir/orig-head" && + echo "$GIT_QUIET" > "$state_dir/quiet" +exit $ret |