-
-
Notifications
You must be signed in to change notification settings - Fork 351
Description
Problem
The project name used as the qualified-name prefix for all indexed nodes is derived from the last component of the repo path:
```python
self.project_name = repo_path.resolve().name
```
This creates confusing results when:
-
The repo is nested inside a same-named parent directory. For example, indexing `
/code/BRender/BlazingRenderer` produces correct names, but if someone previously indexed `/code/BRender` directly, all nodes get the prefix `BRender` instead. Stale `BRender.` nodes then coexist with fresh `BlazingRenderer.` nodes in the same database with no way to distinguish or clean them. -
The directory name is not a good identifier (e.g. `v1.3.2`, `src`, `main`).
Proposed solution
Add a `--project-name` CLI flag that overrides the derived name:
```sh
cgr start --update-graph
--repo-path ~/code/BRender/BlazingRenderer
--project-name BlazingRenderer
```
Implementation is minimal: accept the flag in `cli.py`, pass it to `GraphUpdater.init`, and use it with a fallback:
```python
self.project_name = project_name or repo_path.resolve().name
```
Metadata
Metadata
Assignees
Labels
Projects
Status