@@ -38,7 +38,7 @@ git remote --verbose
38
38
39
39
# Travis does the git clone with a limited depth (50 at the time of
40
40
# writing). This may not be enough to find the common ancestor with
41
- # $REMOTE/master so we unshallow the git checkout
41
+ # $REMOTE/main so we unshallow the git checkout
42
42
if [[ -a .git/shallow ]]; then
43
43
echo -e ' \nTrying to unshallow the repo:'
44
44
echo ' --------------------------------------------------------------------------------'
@@ -59,7 +59,7 @@ if [[ "$TRAVIS" == "true" ]]; then
59
59
fi
60
60
else
61
61
# We want to fetch the code as it is in the PR branch and not
62
- # the result of the merge into master . This way line numbers
62
+ # the result of the merge into main . This way line numbers
63
63
# reported by Travis will match with the local code.
64
64
LOCAL_BRANCH_REF=travis_pr_$TRAVIS_PULL_REQUEST
65
65
# In Travis the PR target is always origin
@@ -68,7 +68,7 @@ if [[ "$TRAVIS" == "true" ]]; then
68
68
fi
69
69
70
70
# If not using the commit range from Travis we need to find the common
71
- # ancestor between $LOCAL_BRANCH_REF and $REMOTE/master
71
+ # ancestor between $LOCAL_BRANCH_REF and $REMOTE/main
72
72
if [[ -z " $COMMIT_RANGE " ]]; then
73
73
if [[ -z " $LOCAL_BRANCH_REF " ]]; then
74
74
LOCAL_BRANCH_REF=$( git rev-parse --abbrev-ref HEAD)
@@ -77,16 +77,16 @@ if [[ -z "$COMMIT_RANGE" ]]; then
77
77
echo ' --------------------------------------------------------------------------------'
78
78
git --no-pager log -2 $LOCAL_BRANCH_REF
79
79
80
- REMOTE_MASTER_REF =" $REMOTE /master "
81
- # Make sure that $REMOTE_MASTER_REF is a valid reference
82
- echo -e " \nFetching $REMOTE_MASTER_REF "
80
+ REMOTE_MAIN_REF =" $REMOTE /main "
81
+ # Make sure that $REMOTE_MAIN_REF is a valid reference
82
+ echo -e " \nFetching $REMOTE_MAIN_REF "
83
83
echo ' --------------------------------------------------------------------------------'
84
- git fetch $REMOTE master :refs/remotes/$REMOTE_MASTER_REF
84
+ git fetch $REMOTE main :refs/remotes/$REMOTE_MAIN_REF
85
85
LOCAL_BRANCH_SHORT_HASH=$( git rev-parse --short $LOCAL_BRANCH_REF )
86
- REMOTE_MASTER_SHORT_HASH =$( git rev-parse --short $REMOTE_MASTER_REF )
86
+ REMOTE_MAIN_SHORT_HASH =$( git rev-parse --short $REMOTE_MAIN_REF )
87
87
88
- COMMIT=$( git merge-base $LOCAL_BRANCH_REF $REMOTE_MASTER_REF ) || \
89
- echo " No common ancestor found for $( git show $LOCAL_BRANCH_REF -q) and $( git show $REMOTE_MASTER_REF -q) "
88
+ COMMIT=$( git merge-base $LOCAL_BRANCH_REF $REMOTE_MAIN_REF ) || \
89
+ echo " No common ancestor found for $( git show $LOCAL_BRANCH_REF -q) and $( git show $REMOTE_MAIN_REF -q) "
90
90
91
91
if [ -z " $COMMIT " ]; then
92
92
exit 1
@@ -95,7 +95,7 @@ if [[ -z "$COMMIT_RANGE" ]]; then
95
95
COMMIT_SHORT_HASH=$( git rev-parse --short $COMMIT )
96
96
97
97
echo -e " \nCommon ancestor between $LOCAL_BRANCH_REF ($LOCAL_BRANCH_SHORT_HASH )" \
98
- " and $REMOTE_MASTER_REF ($REMOTE_MASTER_SHORT_HASH ) is $COMMIT_SHORT_HASH :"
98
+ " and $REMOTE_MAIN_REF ($REMOTE_MAIN_SHORT_HASH ) is $COMMIT_SHORT_HASH :"
99
99
echo ' --------------------------------------------------------------------------------'
100
100
git --no-pager show --no-patch $COMMIT_SHORT_HASH
101
101
0 commit comments