Skip to content

Commit 6ff7204

Browse files
committed
bootstrap: don't use --merges to find commits
Shallow clones can cause `git rev-list --merges` to miss merge commits. Omit it, because the most recent bors commit is almost always a merge commit.
1 parent 5641481 commit 6ff7204

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/bootstrap/bootstrap.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ def download_toolchain(self, stage0=True, rustc_channel=None):
460460
# LLVM more often than necessary.
461461
#
462462
# This git command finds that commit SHA, looking for bors-authored
463-
# merges that modified src/llvm-project or other relevant version
463+
# commits that modified src/llvm-project or other relevant version
464464
# stamp files.
465465
#
466466
# This works even in a repository that has not yet initialized
@@ -470,7 +470,7 @@ def download_toolchain(self, stage0=True, rustc_channel=None):
470470
]).decode(sys.getdefaultencoding()).strip()
471471
llvm_sha = subprocess.check_output([
472472
"git", "rev-list", "[email protected]", "-n1",
473-
"--merges", "--first-parent", "HEAD",
473+
"--first-parent", "HEAD",
474474
"--",
475475
"{}/src/llvm-project".format(top_level),
476476
"{}/src/bootstrap/download-ci-llvm-stamp".format(top_level),
@@ -685,7 +685,7 @@ def maybe_download_ci_toolchain(self):
685685
# Only commits merged by bors will have CI artifacts.
686686
merge_base = [
687687
"git", "rev-list", "[email protected]", "-n1",
688-
"--merges", "--first-parent", "HEAD"
688+
"--first-parent", "HEAD"
689689
]
690690
commit = subprocess.check_output(merge_base, universal_newlines=True).strip()
691691

0 commit comments

Comments
 (0)