Skip to content

Commit 0ecf318

Browse files
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. (copied from bitcoin/bitcoin@fad7281)
1 parent b1579cf commit 0ecf318

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.cirrus.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ cat_logs_snippet: &CAT_LOGS
5353

5454
merge_base_script_snippet: &MERGE_BASE
5555
merge_base_script:
56-
- if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
57-
- git fetch $CIRRUS_REPO_CLONE_URL $CIRRUS_BASE_BRANCH
5856
- git config --global user.email "ci@ci.ci"
5957
- git config --global user.name "ci"
60-
- git merge FETCH_HEAD # Merge base to detect silent merge conflicts
58+
- if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
59+
- git fetch $CIRRUS_REPO_CLONE_URL "pull/${CIRRUS_PR}/merge"
60+
- git checkout FETCH_HEAD # Use merged changes to detect silent merge conflicts
6161

6262
linux_container_snippet: &LINUX_CONTAINER
6363
container:

0 commit comments

Comments
 (0)