| # Copyright (c) 2010 Junio C Hamano. |
| git am --resolved --resolvemsg="$resolvemsg" && |
| git am --skip --resolvemsg="$resolvemsg" && |
| test -n "$rebase_root" && root_flag=--root |
| # we have to do this the hard way. git format-patch completely squashes |
| # empty commits and even if it didn't the format doesn't really lend |
| # itself well to recording empty patches. fortunately, cherry-pick |
| git cherry-pick --allow-empty "$revisions" |
| rm -f "$GIT_DIR/rebased-patches" |
| git format-patch -k --stdout --full-index --ignore-if-in-upstream \ |
| --src-prefix=a/ --dst-prefix=b/ --no-renames --no-cover-letter \ |
| $root_flag "$revisions" >"$GIT_DIR/rebased-patches" |
| rm -f "$GIT_DIR/rebased-patches" |
| git checkout -q "$head_name" |
| git checkout -q "$orig_head" |
| git encountered an error while preparing the patches to replay |
| As a result, git cannot rebase them. |
| git am $git_am_opt --rebasing --resolvemsg="$resolvemsg" <"$GIT_DIR/rebased-patches" |
| rm -f "$GIT_DIR/rebased-patches" |
| test -d "$state_dir" && write_basic_state |