Skip to content

Commit 509a725

Browse files
committed
fix: switch get_untracked_files to -z for special char safety
1 parent 2dafa5f commit 509a725

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/treemapper/diffctx/git.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,7 @@ def split_diff_range(diff_range: str) -> tuple[str | None, str | None]:
115115

116116

117117
def get_untracked_files(repo_root: Path) -> list[Path]:
118-
output = run_git(repo_root, ["ls-files", "--others", "--exclude-standard"])
119-
return [repo_root / line.strip() for line in output.splitlines() if line.strip()]
118+
return [repo_root / p for p in _run_git_z(repo_root, ["ls-files", "--others", "--exclude-standard", "-z"])]
120119

121120

122121
def get_deleted_files(repo_root: Path, diff_range: str) -> set[Path]:

0 commit comments

Comments
 (0)