Skip to content

Commit

Permalink
am: suppress apply errors when using 3-way
Browse files Browse the repository at this point in the history
git-am with 3-way outputs errors when applying, even though the
3-way will usually be successful. We suppress these errors from
git-apply because they are not "true" errors until the 3-way has been
attempted.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Stephen Boyd authored and Junio C Hamano committed Jun 18, 2009
1 parent b3c32ea commit 3ddd170
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion git-am.sh
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,14 @@ do

case "$resolved" in
'')
eval 'git apply '"$git_apply_opt"' --index "$dotest/patch"'
# When we are allowed to fall back to 3-way later, don't give
# false errors during the initial attempt.
squelch=
if test "$threeway" = t
then
squelch='>/dev/null 2>&1 '
fi
eval "git apply $squelch$git_apply_opt"' --index "$dotest/patch"'
apply_status=$?
;;
t)
Expand Down

0 comments on commit 3ddd170

Please sign in to comment.