From 0ecf3188515e46b4da5580b4b9805d2cb927eb91 Mon Sep 17 00:00:00 2001 From: Tim Ruffing Date: Fri, 27 Jan 2023 22:38:45 +0100 Subject: [PATCH 1/2] 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@fad7281d7842f337932cf44e703fdd631230ddd6) --- .cirrus.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index ac682e50a2d4b..3c24cde1393b5 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -53,11 +53,11 @@ cat_logs_snippet: &CAT_LOGS merge_base_script_snippet: &MERGE_BASE merge_base_script: - - if [ "$CIRRUS_PR" = "" ]; then exit 0; fi - - git fetch $CIRRUS_REPO_CLONE_URL $CIRRUS_BASE_BRANCH - git config --global user.email "ci@ci.ci" - git config --global user.name "ci" - - git merge FETCH_HEAD # Merge base to detect silent merge conflicts + - if [ "$CIRRUS_PR" = "" ]; then exit 0; fi + - git fetch $CIRRUS_REPO_CLONE_URL "pull/${CIRRUS_PR}/merge" + - git checkout FETCH_HEAD # Use merged changes to detect silent merge conflicts linux_container_snippet: &LINUX_CONTAINER container: From c2415866c7a6769cb29e3db6c5312c1255b37083 Mon Sep 17 00:00:00 2001 From: Tim Ruffing Date: Fri, 27 Jan 2023 22:44:11 +0100 Subject: [PATCH 2/2] ci: Don't fetch git history (copied from bitcoin/bitcoin@faa65f12fc137231c0333330f670847473650028) --- .cirrus.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 3c24cde1393b5..bed135c3f9f66 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,4 +1,6 @@ env: + ### cirrus config + CIRRUS_CLONE_DEPTH: 1 ### compiler options HOST: WRAPPER_CMD: @@ -56,7 +58,7 @@ merge_base_script_snippet: &MERGE_BASE - git config --global user.email "ci@ci.ci" - git config --global user.name "ci" - if [ "$CIRRUS_PR" = "" ]; then exit 0; fi - - git fetch $CIRRUS_REPO_CLONE_URL "pull/${CIRRUS_PR}/merge" + - git fetch --depth=1 $CIRRUS_REPO_CLONE_URL "pull/${CIRRUS_PR}/merge" - git checkout FETCH_HEAD # Use merged changes to detect silent merge conflicts linux_container_snippet: &LINUX_CONTAINER