Repository navigation
Can I use code-review-graph against a sub-repo? #1136
|
I have a Copilot enabled repository with sub-repos holding the relevant codebases. Can I install |
Replies: 1 comment 1 reply
|
Yes. How you do it depends on what "sub-repo" means in your layout. Indexing uses a) The sub-repos are git submodules of the top-level repo. By default only the parent's own files are indexed. Turn on submodule recursion and you get one graph in cd top-level
CRG_RECURSE_SUBMODULES=1 code-review-graph buildThis adds b) The top level is a plain folder, not a git repo, containing several repos. Just build from the top. With no c) The top level is its own git repo, and the sub-repos are separate clones it ignores. Those files aren't in its code-review-graph build --repo svc_a --data-dir .crg/svc_a
code-review-graph build --repo svc_b --data-dir .crg/svc_b
code-review-graph register svc_a --alias svc_a
code-review-graph register svc_b --alias svc_b
code-review-graph repos
All three layouts were checked with code-review-graph 2.3.9 on small local test repos. For Copilot, |
Yes. How you do it depends on what "sub-repo" means in your layout. Indexing uses
git ls-filesat the detected root, which is the nearest.gitgoing up (FAQ: monorepos and multiple repos). So it matters how git sees the sub-repos.a) The sub-repos are git submodules of the top-level repo. By default only the parent's own files are indexed. Turn on submodule recursion and you get one graph in
<top>/.code-review-graph/:cd top-level CRG_RECURSE_SUBMODULES=1 code-review-graph buildThis adds
--recurse-submodulestogit ls-files(incremental.py#L1392-L1394). Set the same env var wherever the MCP server /updateruns, so incremental updates also include them. The MCP build tool also takesrecu…