Skip to content

Commit 815193f

Browse files
authored
[ci] diff with main merge-base (llvm#69308)
Basically a reland of ec9d80e but now with fetching of main before that to get a correct merge base.
1 parent f0601c7 commit 815193f

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

.ci/generate-buildkite-pipeline-premerge

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,11 @@ set -eu
2121
set -o pipefail
2222

2323
# Environment variables script works with:
24-
# List of files affected by this commit
25-
: ${MODIFIED_FILES:=$(git diff --name-only HEAD~1)}
24+
2625
# Fetch origin/main to have an up to date merge base for main...HEAD diff.
2726
git fetch origin main:main
28-
echo "files modified HEAD~1" >&2
29-
git --no-pager diff --name-only HEAD~1 >&2
30-
echo "files modified main...HEAD" >&2
31-
git --no-pager diff --name-only main...HEAD | head -n 10 >&2
32-
merge_base=$(git merge-base main HEAD)
33-
echo "merge base with main $merge_base" >&2
34-
echo "git log" >&2
35-
git --no-pager log --oneline --abbrev-commit -n 5 >&2
27+
# List of files affected by this commit
28+
: ${MODIFIED_FILES:=$(git diff --name-only main...HEAD)}
3629
# Filter rules for generic windows tests
3730
: ${WINDOWS_AGENTS:='{"queue": "windows"}'}
3831
# Filter rules for generic linux tests

0 commit comments

Comments
 (0)