Skip to content

feat: add recurse_submodules option for git submodule support#215

Merged
tirth8205 merged 2 commits intotirth8205:mainfrom
weirdbb91:feature/recurse-submodules-rebased
Apr 11, 2026
Merged

feat: add recurse_submodules option for git submodule support#215
tirth8205 merged 2 commits intotirth8205:mainfrom
weirdbb91:feature/recurse-submodules-rebased

Conversation

@weirdbb91
Copy link
Copy Markdown
Contributor

Summary

  • 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 priority wins):
    1. Function parameter recurse_submodules=True
    2. Environment variable CRG_RECURSE_SUBMODULES=true
    3. Default: disabled (existing behavior unchanged)

Test plan

  • 4 unit tests (param, default, env-var fallback, param-overrides-env)
  • 4 integration tests with real git repos and submodules
  • All 48 tests in test_incremental.py and test_integration_git.py pass
  • ruff lint passes
  • Rebased on latest upstream/main — no merge conflicts

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)

Tests:
- 4 unit tests (param, default, env-var fallback, param-overrides-env)
- 4 integration tests with real git repos and submodules
@tirth8205 tirth8205 merged commit 802c07f into tirth8205:main Apr 11, 2026
9 checks passed
tirth8205 added a commit that referenced this pull request Apr 11, 2026
Unreleased fixes since v2.2.2 that users are complaining about:
- #208 Claude Code hook schema (fixes #97, #138, #163, #168, #172, #182,
  #188, #191, #201) — v2.2.2 generates an invalid hooks schema and
  timeouts in ms instead of seconds; PreCommit is also not a real event.
- #205 SQLite transaction nesting (fixes #110, #135, #181) — implicit
  transactions from the legacy sqlite3 default caused "cannot start a
  transaction within a transaction" on update.
- #166 Go method receivers resolved from field_identifier.
- #170 UTF-8 decode errors in detect_changes (fixes #169).
- #142 --platform target filters (fixes #133).
- #213 / #183 large-repo community detection hangs.
- #220 CI lint + tomllib on Python 3.10.
- #159 missing pytest-cov dev dep.
- #154 JSX component CALLS edges.

Plus features: #177 Codex, #165 Luau (#153), #217 REFERENCES edge,
#215 recurse_submodules, #185 gitignore default (#175), #171 gitignore
docs (#157).

Verified locally on Python 3.11: ruff clean, mypy clean, bandit clean,
691 tests pass, coverage 73.72%.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tirth8205 tirth8205 mentioned this pull request Apr 11, 2026
5 tasks
tirth8205 added a commit that referenced this pull request Apr 11, 2026
Unreleased fixes since v2.2.2 that users are complaining about:
- #208 Claude Code hook schema (fixes #97, #138, #163, #168, #172, #182,
  #188, #191, #201) — v2.2.2 generates an invalid hooks schema and
  timeouts in ms instead of seconds; PreCommit is also not a real event.
- #205 SQLite transaction nesting (fixes #110, #135, #181) — implicit
  transactions from the legacy sqlite3 default caused "cannot start a
  transaction within a transaction" on update.
- #166 Go method receivers resolved from field_identifier.
- #170 UTF-8 decode errors in detect_changes (fixes #169).
- #142 --platform target filters (fixes #133).
- #213 / #183 large-repo community detection hangs.
- #220 CI lint + tomllib on Python 3.10.
- #159 missing pytest-cov dev dep.
- #154 JSX component CALLS edges.

Plus features: #177 Codex, #165 Luau (#153), #217 REFERENCES edge,
#215 recurse_submodules, #185 gitignore default (#175), #171 gitignore
docs (#157).

Verified locally on Python 3.11: ruff clean, mypy clean, bandit clean,
691 tests pass, coverage 73.72%.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

2 participants