diff --git a/codecov b/codecov index d11b8169..0546aeac 100755 --- a/codecov +++ b/codecov @@ -760,7 +760,11 @@ fi if [ "$commit_o" = "" ]; then # merge commit -> actual commit - mc=$(git show --no-patch --format="%P" 2>/dev/null || echo '') + mc= + if [ -n "$pr" ] && [ "$pr" != false ]; + then + mc=$(git show --no-patch --format="%P" 2>/dev/null || echo '') + fi if [[ "$mc" =~ ^[a-z0-9]{40}[[:space:]][a-z0-9]{40}$ ]]; then say " Fixing merge commit SHA"