Skip to content

Commit ca7a3b7

Browse files
committed
cmd/git(fix[Git.run]): Iterate -C paths instead of appending list
why: The -C flag was appending a list object as the second element, creating invalid argv like ["git", "-C", ["path1", "path2"]] which subprocess cannot handle. Git requires separate -C flags for each path. what: - Iterate over normalized C list and append -C for each path
1 parent 79a5fe8 commit ca7a3b7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/libvcs/cmd/git.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,8 @@ def run(
236236
if C is not None:
237237
if not isinstance(C, list):
238238
C = [C]
239-
C = [str(c) for c in C]
240-
cli_args.extend(["-C", C])
239+
for c in C:
240+
cli_args.extend(["-C", str(c)])
241241
if config is not None:
242242
assert isinstance(config, dict)
243243

0 commit comments

Comments
 (0)