Skip to content

Commit fad7281

Browse files
author
MacroFake
committed
ci: Use remote pull/merge ref instead of local git merge
The merge strategy on the remote may be different than the local one. This may cause local merges to be different or fail completely. Fix this by using the result of the remote merge.
1 parent 291e363 commit fad7281

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.cirrus.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ base_template: &BASE_TEMPLATE
3030
- git config --global user.email "[email protected]"
3131
- git config --global user.name "ci"
3232
- if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
33-
- git fetch $CIRRUS_REPO_CLONE_URL $CIRRUS_BASE_BRANCH
34-
- git merge FETCH_HEAD # Merge base to detect silent merge conflicts
33+
- git fetch $CIRRUS_REPO_CLONE_URL "pull/${CIRRUS_PR}/merge"
34+
- git checkout FETCH_HEAD # Use merged changes to detect silent merge conflicts
3535

3636
main_template: &MAIN_TEMPLATE
3737
timeout_in: 120m # https://cirrus-ci.org/faq/#instance-timed-out

0 commit comments

Comments
 (0)