Skip to content

Commit e7800cb

Browse files
committed
Remove --exclude-pattern gitingest arg to fix Windows bug
1 parent eca094d commit e7800cb

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

llm_context/build_llm_context.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
99
Old context files in ``llm_context/`` are removed before writing new ones.
1010
"""
11+
1112
from __future__ import annotations
1213

1314
import json
@@ -90,14 +91,10 @@ def collect_py_files(root: Path, exclude: Sequence[str] = ()) -> List[Path]:
9091
Sorted list of resolved paths to Python files.
9192
"""
9293
excluded = set(exclude)
93-
return sorted(
94-
f.resolve()
95-
for f in root.rglob("*.py")
96-
if not any(p.name in excluded for p in f.parents)
97-
)
94+
return sorted(f.resolve() for f in root.rglob("*.py") if not any(p.name in excluded for p in f.parents))
9895

9996

100-
def run_gitingest(work_dir: Path, output: Path, exclude: Sequence[str] | None = None) -> None:
97+
def run_gitingest(work_dir: Path, output: Path) -> None:
10198
"""
10299
Run `gitingest` on a directory to generate an LLM context bundle.
103100
@@ -107,8 +104,6 @@ def run_gitingest(work_dir: Path, output: Path, exclude: Sequence[str] | None =
107104
Directory to run gitingest on.
108105
output : Path
109106
Output Markdown file path where results will be saved.
110-
exclude : Sequence[str] or None, optional
111-
List of exclusion patterns for gitingest (default is None).
112107
113108
Raises
114109
------
@@ -118,9 +113,6 @@ def run_gitingest(work_dir: Path, output: Path, exclude: Sequence[str] | None =
118113
If `gitingest` execution fails.
119114
"""
120115
cmd = ["gitingest", str(work_dir), "--output", str(output)]
121-
if exclude:
122-
for pat in exclude:
123-
cmd.extend(["--exclude-pattern", pat])
124116

125117
try:
126118
subprocess.run(cmd, check=True)
@@ -202,8 +194,7 @@ def main() -> None:
202194
else:
203195
sys.stderr.write(f"WARNING: source dir not found: {SRC_DIR}\n")
204196

205-
exclude = [f"**/{d}/**" for d in EXCLUDED_DIR_NAMES] if EXCLUDED_DIR_NAMES else None
206-
run_gitingest(tmp_full, full_output, exclude)
197+
run_gitingest(tmp_full, full_output)
207198

208199

209200
if __name__ == "__main__":

0 commit comments

Comments
 (0)