21
19
test -n "$rebase_root" && root_flag=--root
23
git format-patch -k --stdout --full-index --ignore-if-in-upstream \
24
--src-prefix=a/ --dst-prefix=b/ \
25
--no-renames $root_flag "$revisions" |
26
git am $git_am_opt --rebasing --resolvemsg="$resolvemsg" &&
22
if test -n "$keep_empty"
24
# we have to do this the hard way. git format-patch completely squashes
25
# empty commits and even if it didn't the format doesn't really lend
26
# itself well to recording empty patches. fortunately, cherry-pick
28
git cherry-pick --allow-empty "$revisions"
31
rm -f "$GIT_DIR/rebased-patches"
33
git format-patch -k --stdout --full-index --ignore-if-in-upstream \
34
--src-prefix=a/ --dst-prefix=b/ --no-renames --no-cover-letter \
35
$root_flag "$revisions" >"$GIT_DIR/rebased-patches"
40
rm -f "$GIT_DIR/rebased-patches"
43
git checkout -q "$head_name"
46
git checkout -q "$orig_head"
52
git encountered an error while preparing the patches to replay
57
As a result, git cannot rebase them.
62
git am $git_am_opt --rebasing --resolvemsg="$resolvemsg" <"$GIT_DIR/rebased-patches"
65
rm -f "$GIT_DIR/rebased-patches"
70
test -d "$state_dir" && write_basic_state
27
74
move_to_original_branch
29
test 0 != $ret -a -d "$state_dir" && write_basic_state