Skip to content

force "HEAD" for non-CI and git_upstream_merge_base for CI environment#131358

Merged
bors merged 2 commits intorust-lang:masterfrom
onur-ozkan:129528
Oct 13, 2024
Merged

force "HEAD" for non-CI and git_upstream_merge_base for CI environment#131358
bors merged 2 commits intorust-lang:masterfrom
onur-ozkan:129528

Conversation

@onur-ozkan
Copy link
Copy Markdown
Contributor

@onur-ozkan onur-ozkan commented Oct 7, 2024

When rust-lang/rust is configured as remote, some of the git logic (for tracking changed files) that uses get_closest_merge_commit starts to produce annoying results as the upstream branch becomes outdated quickly (since it isn't updated with git pull). We can rely on HEAD for non-CI environments as we specifically treat bors commits as merge commits, which also exist on upstream. As for CI environments, we should use git_upstream_merge_base to correctly track modified files as bors commits may be in HEAD but not yet on the upstream remote.

This is also an alternative fix for #129528 since #131331 reverts the previous fix attempts.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants