Win32: use low-level memory allocation during initialization
[git/dscho.git] / git-rebase--am.sh
blob04d89415fe8ca1634fa362c66ea9569794dcadd5
1 #!/bin/sh
3 # Copyright (c) 2010 Junio C Hamano.
6 . git-sh-setup
8 case "$action" in
9 continue)
10 git am --resolved --resolvemsg="$resolvemsg" &&
11 move_to_original_branch
12 exit
14 skip)
15 git am --skip --resolvemsg="$resolvemsg" &&
16 move_to_original_branch
17 exit
19 esac
21 test -n "$rebase_root" && root_flag=--root
23 if test -n "$keep_empty"
24 then
25 # we have to do this the hard way. git format-patch completely squashes
26 # empty commits and even if it didn't the format doesn't really lend
27 # itself well to recording empty patches. fortunately, cherry-pick
28 # makes this easy
29 git cherry-pick --allow-empty "$revisions"
30 else
31 git format-patch -k --stdout --full-index --ignore-if-in-upstream \
32 --src-prefix=a/ --dst-prefix=b/ \
33 --no-renames $root_flag "$revisions" |
34 git am $git_am_opt --rebasing --resolvemsg="$resolvemsg"
35 fi && move_to_original_branch
37 ret=$?
38 test 0 != $ret -a -d "$state_dir" && write_basic_state
39 exit $ret