git-am: propagate -C<n>, -p<n> options as well
[gitweb.git] / git-am.sh
index aa602618e6caedbfdd2d54ad4bb8375356cc55f6..ed54e716d9a33a2be9525e48f5f7019e13ea0e3a 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
@@ -247,10 +247,10 @@ else
                exit 1
        }
 
-       # -s, -u, -k and --whitespace flags are kept for the
-       # resuming session after a patch failure.
+       # -s, -u, -k, --whitespace, -C and -p flags are kept
+       # for the resuming session after a patch failure.
        # -3 and -i can and must be given when resuming.
-       echo " $ws" >"$dotest/whitespace"
+       echo " $git_apply_opt" >"$dotest/apply_opt_extra"
        echo "$sign" >"$dotest/sign"
        echo "$utf8" >"$dotest/utf8"
        echo "$keep" >"$dotest/keep"
@@ -283,7 +283,7 @@ if test "$(cat "$dotest/keep")" = t
 then
        keep=-k
 fi
-ws=`cat "$dotest/whitespace"`
+git_apply_opt=$(cat "$dotest/apply_opt_extra")
 if test "$(cat "$dotest/sign")" = t
 then
        SIGNOFF=`git var GIT_COMMITTER_IDENT | sed -e '