From ce657e4fa68069875801d7d1347cd43604eb574f Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Tue, 7 Jan 2025 15:31:21 -0500 Subject: [PATCH 1/3] Fix #323: Always accept local changes to resolve merge conflicts --- bench_runner/templates/_benchmark.src.yml | 24 ++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/bench_runner/templates/_benchmark.src.yml b/bench_runner/templates/_benchmark.src.yml index 8912480e..862dc7b5 100644 --- a/bench_runner/templates/_benchmark.src.yml +++ b/bench_runner/templates/_benchmark.src.yml @@ -130,9 +130,11 @@ jobs: run: | # Another benchmarking task may have created results for the same # commit while the above was running. This "magic" incantation means - # that any local results for this commit will override anything we - # just pulled in in that case. - git pull -s recursive -X ours --autostash --rebase + # that any local results for this commit will override anything that + # happened in the meantime. + # https://stackoverflow.com/questions/43770520/how-to-specify-default-merge-strategy-on-git-stash-pop + git stash + git cherry-pick -n -m1 -Xtheirs stash - name: Add data to repo if: ${{ steps.should_run.outputs.should_run != 'false' }} uses: EndBug/add-and-commit@v9 @@ -227,9 +229,11 @@ jobs: run: | # Another benchmarking task may have created results for the same # commit while the above was running. This "magic" incantation means - # that any local results for this commit will override anything we - # just pulled in in that case. - git pull -s recursive -X ours --autostash --rebase + # that any local results for this commit will override anything that + # happened in the meantime. + # https://stackoverflow.com/questions/43770520/how-to-specify-default-merge-strategy-on-git-stash-pop + git stash + git cherry-pick -n -m1 -Xtheirs stash - name: Adding data to repo if: ${{ steps.should_run.outputs.should_run != 'false' && !inputs.perf }} uses: EndBug/add-and-commit@v9 @@ -321,9 +325,11 @@ jobs: run: | # Another benchmarking task may have created results for the same # commit while the above was running. This "magic" incantation means - # that any local results for this commit will override anything we - # just pulled in in that case. - git pull -s recursive -X ours --autostash --rebase + # that any local results for this commit will override anything that + # happened in the meantime. + # https://stackoverflow.com/questions/43770520/how-to-specify-default-merge-strategy-on-git-stash-pop + git stash + git cherry-pick -n -m1 -Xtheirs stash - name: Add data to repo if: ${{ steps.should_run.outputs.should_run != 'false' }} uses: EndBug/add-and-commit@v9 From 22f9d42bca6840fdd2773d367b5b9d2f9c1016b0 Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Tue, 7 Jan 2025 18:04:00 -0500 Subject: [PATCH 2/3] Update bench_runner/templates/_benchmark.src.yml Co-authored-by: mpage --- bench_runner/templates/_benchmark.src.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/bench_runner/templates/_benchmark.src.yml b/bench_runner/templates/_benchmark.src.yml index 862dc7b5..676c94ad 100644 --- a/bench_runner/templates/_benchmark.src.yml +++ b/bench_runner/templates/_benchmark.src.yml @@ -134,6 +134,7 @@ jobs: # happened in the meantime. # https://stackoverflow.com/questions/43770520/how-to-specify-default-merge-strategy-on-git-stash-pop git stash + git pull -s recursive --rebase git cherry-pick -n -m1 -Xtheirs stash - name: Add data to repo if: ${{ steps.should_run.outputs.should_run != 'false' }} From c7a330ed604734ac31fb43b223c0805641835273 Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Wed, 8 Jan 2025 09:25:10 -0500 Subject: [PATCH 3/3] Actually do a pull --- bench_runner/templates/_benchmark.src.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bench_runner/templates/_benchmark.src.yml b/bench_runner/templates/_benchmark.src.yml index 676c94ad..ad5fffa4 100644 --- a/bench_runner/templates/_benchmark.src.yml +++ b/bench_runner/templates/_benchmark.src.yml @@ -234,6 +234,7 @@ jobs: # happened in the meantime. # https://stackoverflow.com/questions/43770520/how-to-specify-default-merge-strategy-on-git-stash-pop git stash + git pull -s recursive --rebase git cherry-pick -n -m1 -Xtheirs stash - name: Adding data to repo if: ${{ steps.should_run.outputs.should_run != 'false' && !inputs.perf }} @@ -330,6 +331,7 @@ jobs: # happened in the meantime. # https://stackoverflow.com/questions/43770520/how-to-specify-default-merge-strategy-on-git-stash-pop git stash + git pull -s recursive --rebase git cherry-pick -n -m1 -Xtheirs stash - name: Add data to repo if: ${{ steps.should_run.outputs.should_run != 'false' }}