Skip to content

Commit b8a80e4

Browse files
authored
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 #142534
2 parents be8c29c + b79a4bf commit b8a80e4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/bootstrap/bootstrap.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,16 +1193,16 @@ def get_latest_commit(self):
11931193
return "<commit>"
11941194
cmd = [
11951195
"git",
1196-
"-C",
1197-
repo_path,
11981196
"rev-list",
11991197
"--author",
12001198
author_email,
12011199
"-n1",
12021200
"HEAD",
12031201
]
12041202
try:
1205-
commit = subprocess.check_output(cmd, universal_newlines=True).strip()
1203+
commit = subprocess.check_output(
1204+
cmd, universal_newlines=True, cwd=repo_path
1205+
).strip()
12061206
return commit or "<commit>"
12071207
except subprocess.CalledProcessError:
12081208
return "<commit>"

0 commit comments

Comments
 (0)