Skip to content

Commit b55bee6

Browse files
committed
fix: use FETCH_HEAD instead of branch name in git checkout
git checkout -- <name> treats the argument as a pathspec, not a branch name, causing "pathspec did not match" errors. Using FETCH_HEAD avoids passing any user-controlled input to the checkout command entirely.
1 parent 953fa81 commit b55bee6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/scripts/run-benchmarks.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ echo "Parsed filter: ${FILTER:-<none>}"
8585
# "changes" baseline files are preserved across the branch switch.
8686
# ---------------------------------------------------------------------------
8787
git fetch origin -- "$BASE_REF"
88-
git checkout -- "$BASE_REF"
88+
git checkout FETCH_HEAD
8989
(cd benchmarks && cargo bench --locked --bench workload_bench -- --save-baseline base "$FILTER")
9090

9191
# ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)