Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
improve merge commit detection
Browse files Browse the repository at this point in the history
  • Loading branch information
stevepeak committed Dec 18, 2017
1 parent 8163b8e commit beaae43
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions codecov
Expand Up @@ -760,11 +760,11 @@ fi
if [ "$commit_o" = "" ];
then
# merge commit -> actual commit
mc=$(git log -1 --pretty=%B 2>/dev/null | tr -d '[[:space:]]' || true)
if [[ "$mc" =~ ^Merge[[:space:]][a-z0-9]{40}[[:space:]]into[[:space:]][a-z0-9]{40}$ ]];
mc=$(git show --no-patch --format="%P" 2>/dev/null | tr -d '[[:space:]]' || echo "")

This comment has been minimized.

Copy link
@blueyed

blueyed Dec 19, 2017

Contributor

The tr will remove the space inbetween, resulting in 80 chars.

This comment has been minimized.

Copy link
@stevepeak

stevepeak Dec 20, 2017

Author Contributor

Correct. 👍

if [[ "$mc" =~ ^[a-z0-9]{40}[[:space:]][a-z0-9]{40}$ ]];
then
# Merge xxx into yyy
say " Fixing merge commit sha"
say " Fixing merge commit SHA"
commit=$(echo "$mc" | cut -d' ' -f2)
elif [ "$GIT_COMMIT" != "" ];
then
Expand Down

0 comments on commit beaae43

Please sign in to comment.