Skip to content

Commit 21d3626

Browse files
authored
Merge pull request #325 from faster-cpython/handle-merge-conflicts
Fix #323: Always accept local changes to resolve merge conflicts
2 parents 81c8947 + cfb9c28 commit 21d3626

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

bench_runner/templates/_benchmark.src.yml

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,12 @@ jobs:
132132
run: |
133133
# Another benchmarking task may have created results for the same
134134
# commit while the above was running. This "magic" incantation means
135-
# that any local results for this commit will override anything we
136-
# just pulled in in that case.
137-
git pull -s recursive -X ours --autostash --rebase
135+
# that any local results for this commit will override anything that
136+
# happened in the meantime.
137+
# https://stackoverflow.com/questions/43770520/how-to-specify-default-merge-strategy-on-git-stash-pop
138+
git stash
139+
git pull -s recursive --rebase
140+
git cherry-pick -n -m1 -Xtheirs stash
138141
- name: Add data to repo
139142
if: ${{ steps.should_run.outputs.should_run != 'false' }}
140143
uses: EndBug/add-and-commit@v9
@@ -236,9 +239,12 @@ jobs:
236239
run: |
237240
# Another benchmarking task may have created results for the same
238241
# commit while the above was running. This "magic" incantation means
239-
# that any local results for this commit will override anything we
240-
# just pulled in in that case.
241-
git pull -s recursive -X ours --autostash --rebase
242+
# that any local results for this commit will override anything that
243+
# happened in the meantime.
244+
# https://stackoverflow.com/questions/43770520/how-to-specify-default-merge-strategy-on-git-stash-pop
245+
git stash
246+
git pull -s recursive --rebase
247+
git cherry-pick -n -m1 -Xtheirs stash
242248
- name: Adding data to repo
243249
if: ${{ steps.should_run.outputs.should_run != 'false' && !inputs.perf }}
244250
uses: EndBug/add-and-commit@v9
@@ -338,9 +344,12 @@ jobs:
338344
run: |
339345
# Another benchmarking task may have created results for the same
340346
# commit while the above was running. This "magic" incantation means
341-
# that any local results for this commit will override anything we
342-
# just pulled in in that case.
343-
git pull -s recursive -X ours --autostash --rebase
347+
# that any local results for this commit will override anything that
348+
# happened in the meantime.
349+
# https://stackoverflow.com/questions/43770520/how-to-specify-default-merge-strategy-on-git-stash-pop
350+
git stash
351+
git pull -s recursive --rebase
352+
git cherry-pick -n -m1 -Xtheirs stash
344353
- name: Add data to repo
345354
if: ${{ steps.should_run.outputs.should_run != 'false' }}
346355
uses: EndBug/add-and-commit@v9

0 commit comments

Comments
 (0)