diff --git a/git_py_stats/git_operations.py b/git_py_stats/git_operations.py index 80f0a4e..a13ba9b 100644 --- a/git_py_stats/git_operations.py +++ b/git_py_stats/git_operations.py @@ -21,7 +21,13 @@ def run_git_command(cmd: List[str]) -> Optional[str]: return None try: result = subprocess.run( - cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, check=True + cmd, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + text=True, + check=True, + encoding="utf-8", + errors="replace", ) return result.stdout.strip() except subprocess.CalledProcessError as e: