force "HEAD" for non-CI and git_upstream_merge_base for CI environment#131358
Merged
bors merged 2 commits intorust-lang:masterfrom Oct 13, 2024
Merged
force "HEAD" for non-CI and git_upstream_merge_base for CI environment#131358bors merged 2 commits intorust-lang:masterfrom
git_upstream_merge_base for CI environment#131358bors merged 2 commits intorust-lang:masterfrom
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_baseto correctly track modified files as bors commits may be inHEADbut not yet on the upstream remote.This is also an alternative fix for #129528 since #131331 reverts the previous fix attempts.