Rename Repo Column to Name for Consistency · Entire
repo mirror list
The repo mirror list shows the repo name column as repo. To filter it, it looks like the command is entire repo mirror --repo, but should we rename the column and the filter to name so repo is not everywhere?
My Opinion: Keep both. Don't rename.
Reasons:
- The value shown is
owner/repo, not a bare name, so--nameis less accurate than--repo. --repofor owner/repo selection follows the GitHub convention (e.g.,gh repo view --repo,-R owner/repo). Users are familiar with it. Renaming to--namebreaks that convention.- Redundancy with
repo mirror --repois harmless, as it aligns withgh repo ... --repo. The group noun does not create a flag collision. - Changing to
--namewould replace a known convention with something new, leading to unnecessary churn and breaking changes.
Alternative Suggestion:
If redundancy is an issue, consider adding a -R short alias (gh-style) instead of renaming. This approach is additive and avoids breaking anything.
Implementation Changes
- Looked at code in
repo_mirror.go:26for columnREPO, and:575for flag--repofilters. - Decision made to:
- Rename Column
REPOtoNAME (owner/repo)for clarity. - Change Flag
--repoto--namefor consistency in filtering. - Ensure that
parseSortColumnmaintains correct functionality with both--sort nameand--sort "name (owner/repo)".
- Rename Column
- Test Results:
- Build successful; tests in
TestRepoMirrorList*confirmed the changes work. - Linting passed without issues.
- Build successful; tests in
Command Updates
- After changes were made, the command
mise run dev:publishwas implemented:
$ ~/wks/cli/cli/mise-tasks/dev/publish
Installing into: /Users/gtrrz-victor/go/bin
Installed: 'entire'
Installed: 'git-remote-entire'
Final Note
- The changes have been published, and the command behavior is now aligned with expectations. The key names are now kebab-case, allowing for easier usage (e.g.,
--sort clone-urlwithout quotes). - The status is clean, and all tests have passed.