feat: add recurse_submodules option for git submodule support#71
Closed
weirdbb91 wants to merge 1 commit intotirth8205:mainfrom
Closed
feat: add recurse_submodules option for git submodule support#71weirdbb91 wants to merge 1 commit intotirth8205:mainfrom
weirdbb91 wants to merge 1 commit intotirth8205:mainfrom
Conversation
Add opt-in `recurse_submodules` parameter to `build_or_update_graph`, `full_build`, `collect_all_files`, and `get_all_tracked_files` so that files inside git submodules are included in the knowledge graph. When enabled, `git ls-files --recurse-submodules` is used instead of plain `git ls-files`. The option can be set three ways (highest wins): 1. Function parameter `recurse_submodules=True` 2. Environment variable `CRG_RECURSE_SUBMODULES=true` 3. Default: disabled (existing behavior unchanged) This unblocks monorepo setups that use git submodules — previously the parent repo's `git ls-files` returned only gitlink entries for submodule directories, causing the graph builder to find zero parseable files. Tests: - 4 unit tests (param, default, env-var fallback, param-overrides-env) - 4 integration tests with real git repos and submodules - Full suite: 510 passed, 0 failed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add opt-in
recurse_submodulesparameter tobuild_or_update_graph,full_build,collect_all_files, andget_all_tracked_filesso that files inside git submodules are included in the knowledge graph.When enabled,
git ls-files --recurse-submodulesis used instead of plaingit ls-files. The option can be set three ways (highest wins):recurse_submodules=TrueCRG_RECURSE_SUBMODULES=trueThis unblocks monorepo setups that use git submodules — previously the parent repo's
git ls-filesreturned only gitlink entries for submodule directories, causing the graph builder to find zero parseable files.Tests: