Skip to content

feat: add recurse_submodules option for git submodule support#71

Closed
weirdbb91 wants to merge 1 commit intotirth8205:mainfrom
weirdbb91:feature/recurse-submodules
Closed

feat: add recurse_submodules option for git submodule support#71
weirdbb91 wants to merge 1 commit intotirth8205:mainfrom
weirdbb91:feature/recurse-submodules

Conversation

@weirdbb91
Copy link
Copy Markdown

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

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
@weirdbb91 weirdbb91 closed this Mar 27, 2026
@weirdbb91 weirdbb91 reopened this Mar 27, 2026
@weirdbb91 weirdbb91 closed this Mar 30, 2026
@weirdbb91 weirdbb91 deleted the feature/recurse-submodules branch March 30, 2026 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant