about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorJana Dönszelmann <jonathan@donsz.nl>2025-09-17 20:29:38 +0200
committerGitHub <noreply@github.com>2025-09-17 20:29:38 +0200
commitb8a80e4f79498f0ef7e4aff03d9706b9126899a3 (patch)
tree918979c59e970206c35d18b2ddfbc99bd9fb5322 /src
parentbe8c29ccf272fc3a475f93de1de70e25183a7380 (diff)
parentb79a4bfad66dea3a8b6bc90985cb65378288fe07 (diff)
downloadrust-b8a80e4f79498f0ef7e4aff03d9706b9126899a3.tar.gz
rust-b8a80e4f79498f0ef7e4aff03d9706b9126899a3.zip
Rollup merge of #146654 - samueltardieu:issue142534, r=Kobzol
Do not use `git -C dir`

Older versions of git (≤ 1.8.5) do not support the `-C dir` global option. Use the `cwd` optional argument when using Python's `subprocess` functionality instead.

Fix rust-lang/rust#142534
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/bootstrap.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
index 19e87f9c293..effd33d288f 100644
--- a/src/bootstrap/bootstrap.py
+++ b/src/bootstrap/bootstrap.py
@@ -1193,8 +1193,6 @@ class RustBuild(object):
             return "<commit>"
         cmd = [
             "git",
-            "-C",
-            repo_path,
             "rev-list",
             "--author",
             author_email,
@@ -1202,7 +1200,9 @@ class RustBuild(object):
             "HEAD",
         ]
         try:
-            commit = subprocess.check_output(cmd, universal_newlines=True).strip()
+            commit = subprocess.check_output(
+                cmd, universal_newlines=True, cwd=repo_path
+            ).strip()
             return commit or "<commit>"
         except subprocess.CalledProcessError:
             return "<commit>"