1 # This shell script fragment is sourced by git-rebase to implement
2 # its default, fast, patch-based, non-interactive mode.
4 # Copyright (c) 2010 Junio C Hamano.
11 git am
--resolved --resolvemsg="$resolvemsg" \
12 ${gpg_sign_opt:+"$gpg_sign_opt"} &&
13 move_to_original_branch
17 git am
--skip --resolvemsg="$resolvemsg" &&
18 move_to_original_branch
22 exec git am
--show-current-patch
26 if test -z "$rebase_root"
27 # this is now equivalent to ! -z "$upstream"
29 revisions
=$upstream...
$orig_head
31 revisions
=$onto...
$orig_head
35 rm -f "$GIT_DIR/rebased-patches"
37 git format-patch
-k --stdout --full-index --cherry-pick --right-only \
38 --src-prefix=a
/ --dst-prefix=b
/ --no-renames --no-cover-letter \
39 --pretty=mboxrd
--topo-order \
40 $git_format_patch_opt \
41 "$revisions" ${restrict_revision+^$restrict_revision} \
42 >"$GIT_DIR/rebased-patches"
47 rm -f "$GIT_DIR/rebased-patches"
50 git checkout
-q "$head_name"
53 git checkout
-q "$orig_head"
59 git encountered an error while preparing the patches to replay
64 As a result, git cannot rebase them.
69 git am
$git_am_opt --rebasing --resolvemsg="$resolvemsg" \
70 --patch-format=mboxrd \
71 $allow_rerere_autoupdate \
72 ${gpg_sign_opt:+"$gpg_sign_opt"} <"$GIT_DIR/rebased-patches"
75 rm -f "$GIT_DIR/rebased-patches"
79 test -d "$state_dir" && write_basic_state
83 move_to_original_branch