fix(mcp): include untracked files in preflight porcelain parsing (Closes #697, Ref #700)

This commit is contained in:
2026-07-25 19:12:07 -04:00
parent 2b4e43042a
commit 00e526512a
2 changed files with 34 additions and 2 deletions
+2 -2
View File
@@ -577,10 +577,10 @@ def _get_workspace_porcelain(worktree_path: str | None = None) -> str:
def _parse_porcelain_entries(porcelain: str) -> dict[str, str]:
"""Map tracked path -> full porcelain line (untracked ``??`` ignored)."""
"""Map path -> full porcelain line (including untracked ``??``)."""
entries: dict[str, str] = {}
for line in (porcelain or "").splitlines():
if not line or len(line) < 4 or line.startswith("??"):
if not line or len(line) < 4:
continue
path = line[3:].strip()
if " -> " in path: