-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
feat(cli): analyze --name <alias> + duplicate-name guard for the repo registry #955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
magyargergo
merged 6 commits into
abhigyanpatwari:main
from
azizur100389:feat/analyze-name-alias
Apr 19, 2026
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a06c6e3
feat(cli): analyze --name <alias> + duplicate-name guard for the repo…
azizur100389 ded8b94
fix(cli): wire --force through to registerRepo + rename collision field
azizur100389 36d6625
test(cli): end-to-end integration coverage for analyze --name + --for…
azizur100389 76431bf
fix(test): canonicalize tmp paths for cross-platform equality (#955 CI)
azizur100389 915271c
refactor(cli): split --force from registry bypass; add --allow-duplic…
azizur100389 553ee0e
docs(cli): clarify --allow-duplicate-name scope + rename collision va…
azizur100389 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do I understand correctly I can make multiple analysis on one repo and has multiple aliases with this option?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question — no. One repo path always maps to exactly one registry entry, and therefore exactly one alias.
Concretely,
registerRepoupserts by resolved path:entries.findIndex(...)ongitnexus/src/storage/repo-manager.ts:329locates the existing entry for this path, and the write branch atgitnexus/src/storage/repo-manager.ts:368either updates that slot in place or pushes a new one — never both. So runninganalyze --name Yon a repo that was previously--name Xreplaces X with Y rather than adding a second entry. That invariant is locked in by there-registerRepo with a different name overrides the previous aliastest at repo-manager.test.ts:196.--allow-duplicate-nameoperates in the orthogonal direction: it permits two different paths to share one alias (rendering-r <alias>ambiguous between those two paths, at which point the user falls back to-r <path>, which already works).In
553ee0eI expanded the JSDoc on this field to spell that scope out explicitly — "cross-path alias sharing only · one path → one entry always ·--name Yon the same path overwrites--name X" — so the next reader doesn't have to reconstruct it from the code.