Skip to content

Commit 1682382

Browse files
authored
Rollup merge of #87513 - hudson-ayers:bootstrap-py-fix, r=jyn514
bootstrap.py: change `git log` option to indicate desired behavior When determining which LLVM artifacts to download, bootstrap.py calls: `git log --author=bors --format=%H -n1 -m --first-parent -- src/llvm-project src/bootstrap/download-ci-llvm-stamp src/version`. However, the `-m` option has no effect, per the `git log` help: > -m > This option makes diff output for merge commits to be shown in the > default format. -m will produce the output only if -p is given as > well. The default format could be changed using log.diffMerges > configuration parameter, which default value is separate. Accordingly, this commit removes use of the -m option in favor of ~~`--diff-merges=off`~~ `--no-patch`, since no diff information is needed, and in fact the presence of a diff breaks the command. Tested using git 2.32, this does not change the output of the command. The motivation for this change is that some patched versions of git change the behavior of the `-m` flag to imply `-p`, rather than to do nothing unless `-p` is passed. These patched versions of git lead to this script not working. Google's corp-provided git is one such example.
2 parents 8bc7ec1 + 1259742 commit 1682382

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bootstrap/bootstrap.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ def download_toolchain(self, stage0=True, rustc_channel=None):
473473
]).decode(sys.getdefaultencoding()).strip()
474474
llvm_sha = subprocess.check_output([
475475
"git", "log", "--author=bors", "--format=%H", "-n1",
476-
"-m", "--first-parent",
476+
"--no-patch", "--first-parent",
477477
"--",
478478
"{}/src/llvm-project".format(top_level),
479479
"{}/src/bootstrap/download-ci-llvm-stamp".format(top_level),

0 commit comments

Comments
 (0)