Skip to content

Commit 22db240

Browse files
committed
git-am: propagate --3way options as well
The reasoning is the same as the previous patch, where we made -C<n> and -p<n> propagate across a failure. Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent a200337 commit 22db240

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

git-am.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,11 @@ else
247247
exit 1
248248
}
249249

250-
# -s, -u, -k, --whitespace, -C and -p flags are kept
250+
# -s, -u, -k, --whitespace, -3, -C and -p flags are kept
251251
# for the resuming session after a patch failure.
252-
# -3 and -i can and must be given when resuming.
252+
# -i can and must be given when resuming.
253253
echo " $git_apply_opt" >"$dotest/apply_opt_extra"
254+
echo "$threeway" >"$dotest/threeway"
254255
echo "$sign" >"$dotest/sign"
255256
echo "$utf8" >"$dotest/utf8"
256257
echo "$keep" >"$dotest/keep"
@@ -283,6 +284,10 @@ if test "$(cat "$dotest/keep")" = t
283284
then
284285
keep=-k
285286
fi
287+
if test "$(cat "$dotest/threeway")" = t
288+
then
289+
threeway=t
290+
fi
286291
git_apply_opt=$(cat "$dotest/apply_opt_extra")
287292
if test "$(cat "$dotest/sign")" = t
288293
then

0 commit comments

Comments
 (0)