diff --git a/src/context_engine/indexer/git_indexer.py b/src/context_engine/indexer/git_indexer.py index 7d439a4..1cb3a0d 100644 --- a/src/context_engine/indexer/git_indexer.py +++ b/src/context_engine/indexer/git_indexer.py @@ -32,7 +32,8 @@ async def index_commits( meta_result = await asyncio.to_thread( subprocess.run, ["git", "log", range_arg, "--format=%H%n%an%n%ai%n%s%n%b%x00"], - cwd=project_dir, capture_output=True, text=True, check=False, + cwd=project_dir, capture_output=True, text=True, + encoding="utf-8", errors="replace", check=False, ) if meta_result.returncode != 0: @@ -42,7 +43,8 @@ async def index_commits( files_result = await asyncio.to_thread( subprocess.run, ["git", "log", range_arg, "--name-only", "--format=%H"], - cwd=project_dir, capture_output=True, text=True, check=False, + cwd=project_dir, capture_output=True, text=True, + encoding="utf-8", errors="replace", check=False, ) changed_files_by_hash: dict[str, list[str]] = {}