Skip to content

Commit 0e741ea

Browse files
committed
fix: use explicit utf-8 encoding in git subprocess calls
1 parent 8a37d63 commit 0e741ea

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/treemapper/diffctx/git.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ def run_git(repo_root: Path, args: list[str]) -> str:
1919
result = subprocess.run(
2020
["git", "-C", str(repo_root), *args],
2121
capture_output=True,
22-
text=True,
22+
encoding="utf-8",
23+
errors="replace",
2324
check=True,
2425
)
2526
return result.stdout

0 commit comments

Comments
 (0)