Skip to content

Commit b95aac6

Browse files
committed
Auto merge of rust-lang#138878 - jieyouxu:revert-ci-llvm, r=dianqk
Revert "fix download-llvm logic for subtree sync branches rust-lang#137593" Reverts rust-lang#137593. Looks like unfortunately the `--diff-merges=first-parent` flag is a `git show`-only flag, not `git rev-list` which only accepts `--first-parent`. See https://git-scm.com/docs/git-rev-list#Documentation/git-rev-list.txt---first-parent which has `--first-parent`, versus https://git-scm.com/docs/git-show#Documentation/git-show.txt---diff-mergesltformatgt which has `--diff-merges=first-parent`. This reverts commit 95994f9, reversing changes made to 7290b04. This will unfortunately re-open rust-lang#101907 but that isn't fixed anyway since the git invocation is broken. cc `@RalfJung` `@Mark-Simulacrum` for FYI (but I would've written the same incorrect flag 💀) r? `@onur-ozkan` (or bootstrap or infra or anyone really)
2 parents ae8ab87 + c71569a commit b95aac6

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/build_helper/src/git.rs

+1-9
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ pub fn get_closest_merge_commit(
140140
// cd \"/checkout\" && \"git\" \"merge-base\" \"origin/master\" \"HEAD\"\nexpected success, got: exit status: 1\n"
141141
// ```
142142
// Investigate and resolve this issue instead of skipping it like this.
143-
// NOTE (2025-03): this is probably caused by CI using a sparse checkout.
144143
(channel == "nightly" || !CiEnv::is_rust_lang_managed_ci_job())
145144
{
146145
git_upstream_merge_base(config, git_dir).unwrap()
@@ -151,18 +150,11 @@ pub fn get_closest_merge_commit(
151150
}
152151
};
153152

154-
// Now that rust-lang/rust is the only repo using bors, we can search the entire
155-
// history for a bors commit, not just "first parents". This is crucial to make
156-
// this logic work when the user has currently checked out a subtree sync branch.
157-
// At the same time, we use this logic in CI where only a tiny part of the history
158-
// is even checked out, making this kind of history search very fragile. It turns
159-
// out that by adding `--diff-merges=first-parent`, we get a usable reply
160-
// even for sparse checkouts: it will just return the most recent bors commit.
161153
git.args([
162154
"rev-list",
163155
&format!("--author={}", config.git_merge_commit_email),
164156
"-n1",
165-
"--diff-merges=first-parent",
157+
"--first-parent",
166158
&merge_base,
167159
]);
168160

0 commit comments

Comments
 (0)