Commit 5d0a56d
committed
Make PR change-detection robust to shallow base fetch (no merge base)
detect-changed-benchmarks.sh fetches the PR base at --depth=1 and then runs
a three-dot diff (origin/master...HEAD), which requires a merge base. Once
master advances past the PR's branch point, the depth=1 base graft shares no
ancestor with HEAD, so git aborts with "fatal: origin/master...HEAD: no merge
base" (exit 128) and the Detect Changed Benchmarks job fails. This broke
re-runs of e.g. #1581 and #1570.
Suppress the three-dot error and fall back to diffing the PR merge commit
against its first parent (HEAD~1 = base tip), which yields exactly the PR's
changes without needing a merge base. This mirrors the existing robust pattern
already used on the push path in the same script.
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>1 parent 43fa749 commit 5d0a56d
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
24 | 32 | | |
25 | 33 | | |
26 | 34 | | |
| |||
0 commit comments