Index a repository
Let Go to Declaration and Find Usages reach the code a pull request did not touch.
Without an index, Go to Declaration, Go to Implementation and Find Usages read only the files of the pull request you review: a declaration in a file the pull request did not change is out of reach, and a caller outside it is not found. Index the repository, and they read the whole repository — the pull request laid over the branch it targets.
What it needs
- The repository on your disk. The index reads a repository's own clone: a local repository, or a hosted one whose connection has a Local clone path (see Connect a repository). Nothing is fetched from the platform.
- The Pro plan.
Turn it on
| App | Where |
|---|---|
| Desktop app | Settings › Repositories › Repository index, the repository's menu on the rail (Index repository…), or ⌘K › Index Repository… |
| Terminal | The footer shows the index of the repository on screen; its memory budget is under Storage |
The picker asks two things:
- Base branches — the branches the index is built from. A pull request is laid over the base nearest to it. The repository's default branch unless you choose others; each one adds to the memory.
- Directories — what the index holds: the whole repository, or the folders you pick. Submodules, Git LFS pointers, minified and vendored code and files over 5 MB are always left out.
It estimates the memory your choice takes against the budget before you save.
While it builds
The index builds in the background. The status bar says where it stands — Index: building 45%, then Index: ready — and until it is ready, questions are answered from the pull request's files. A choice over the memory budget is not built: raise the budget in Settings › Repositories › Memory, or pick fewer directories.
Where your choice is kept
| File | Whose |
|---|---|
.mantish/repository-index.local.json in the repository | You, in this repository only — the only file that turns the index on |
.mantish/repository-index.json in the repository | Your team — commit it; it suggests branches and directories |
~/.mantish/repository-index.json on your computer | You, in every repository |
The picker writes your local file. The team's file and yours for every repository add their choices to it, but turn nothing on: no memory is spent on a repository you did not choose to index.