summaryrefslogtreecommitdiff
path: root/git-am.sh
diff options
context:
space:
mode:
authorStephen Boyd <bebarino@gmail.com>2009-06-16 22:32:58 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-06-18 16:50:25 (GMT)
commit3ddd170323fcf24af8c4a321ed9c73cda532986e (patch)
tree3b7f6f6002c8b54d5dd7e073ecee977d862eff17 /git-am.sh
parentb3c32ead20bc4d3baa6cffe00dd862f069463869 (diff)
downloadgit-3ddd170323fcf24af8c4a321ed9c73cda532986e.zip
git-3ddd170323fcf24af8c4a321ed9c73cda532986e.tar.gz
git-3ddd170323fcf24af8c4a321ed9c73cda532986e.tar.bz2
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>
Diffstat (limited to 'git-am.sh')
-rwxr-xr-xgit-am.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/git-am.sh b/git-am.sh
index 578780b..e26c54a 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -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)