@matheusbsbs / matheus-bagliano / commits / 3ddd170323
Fork 0

am: suppress apply errors when using 3-way

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>

Stephen Boyd committed Jun 16, 2009 at 15:32 UTC 3ddd170323fcf24af8c4a321ed9c73cda532986e
1 file changed +8 -1
git-am.sh
+8 -1
@@ -502,7 +502,14 @@ do
502
503 case "$resolved" in
504 '')
505 - eval 'git apply '"$git_apply_opt"' --index "$dotest/patch"'
505 + # When we are allowed to fall back to 3-way later, don't give
506 + # false errors during the initial attempt.
507 + squelch=
508 + if test "$threeway" = t
509 + then
510 + squelch='>/dev/null 2>&1 '
511 + fi
512 + eval "git apply $squelch$git_apply_opt"' --index "$dotest/patch"'
513 apply_status=$?
514 ;;
515 t)