diff --git a/src/gitingest/entrypoint.py b/src/gitingest/entrypoint.py index f64dec08..026a27ec 100644 --- a/src/gitingest/entrypoint.py +++ b/src/gitingest/entrypoint.py @@ -83,15 +83,14 @@ async def ingest_async( token=token, ) - if not include_gitignored: - _apply_gitignores(query) - if query.url: _override_branch_and_tag(query, branch=branch, tag=tag) query.include_submodules = include_submodules async with _clone_repo_if_remote(query, token=token): + if not include_gitignored: + _apply_gitignores(query) summary, tree, content = ingest_query(query) await _write_output(tree, content=content, target=output) return summary, tree, content diff --git a/src/gitingest/utils/ignore_patterns.py b/src/gitingest/utils/ignore_patterns.py index 3fb0705d..5236e4d1 100644 --- a/src/gitingest/utils/ignore_patterns.py +++ b/src/gitingest/utils/ignore_patterns.py @@ -194,7 +194,6 @@ def load_ignore_patterns(root: Path, filename: str) -> set[str]: for ignore_file in root.rglob(filename): if ignore_file.is_file(): patterns.update(_parse_ignore_file(ignore_file, root)) - return patterns