summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1556ef1)
raw | patch | inline | side by side (parent: 1556ef1)
author | Junio C Hamano <gitster@pobox.com> | |
Thu, 4 Dec 2008 23:38:27 +0000 (15:38 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 5 Dec 2008 02:45:01 +0000 (18:45 -0800) |
These options are meant to deal with patches that do not apply cleanly
due to the differences between the version the patch was based on and
the version "git am" is working on.
Because a series of patches applied in the same "git am" run tends to
come from the same source, it is more useful to propagate these options
after the application stops.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
due to the differences between the version the patch was based on and
the version "git am" is working on.
Because a series of patches applied in the same "git am" run tends to
come from the same source, it is more useful to propagate these options
after the application stops.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-am.sh | patch | blob | history |
diff --git a/git-am.sh b/git-am.sh
index 1bf70d47779aeddd281895bc5523ed66a549da99..ed54e716d9a33a2be9525e48f5f7019e13ea0e3a 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
prec=4
dotest="$GIT_DIR/rebase-apply"
-sign= utf8=t keep= skip= interactive= resolved= rebasing= abort= ws=
+sign= utf8=t keep= skip= interactive= resolved= rebasing= abort=
resolvemsg= resume=
git_apply_opt=
--resolvemsg)
shift; resolvemsg=$1 ;;
--whitespace)
- ws="--whitespace=$2"; shift ;;
+ git_apply_opt="$git_apply_opt $1=$2"; shift ;;
-C|-p)
git_apply_opt="$git_apply_opt $1$2"; shift ;;
--)
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"
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 '
case "$resolved" in
'')
- git apply $git_apply_opt $ws --index "$dotest/patch"
+ git apply $git_apply_opt --index "$dotest/patch"
apply_status=$?
;;
t)