Repository management: zfj repo #36
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jeff/zfj#36
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A
zfj repoporcelain group for managing repositories:view,list,clone,create,fork,editanddelete. Plumbing stays as it is;zfj op repoGetand the rest already reach every repository operation.Decisions
zfj repo, insrc/cli/repo.zig, built onporcelain.dispatch/Runnerlikeissueandpr.[<owner>/<repo>], falling back to the clone'supstream/originremote. A bare name means the authenticated user's repository forcreate,viewandcloneonly.edittakes no bare name.deletetakes the repository only as an argument, never from the remote. Seedocs/adr/0006-repo-commands-name-the-repository-positionally.md.--clone,--remote, orzfj repo cloneitself.--protocol ssh|httpsper command; a per-instance default set byzfj login ... --protocol; https when neither says.GLOSSARY.md.Deferred
archive/unarchive(they areedit --archive),transfer,migrateand mirrors,mirror-sync, topics, generating from a template, starring,listfilters (throughrepoSearch), showing the README inview. Each is reachable throughzfj opmeanwhile.Commands
One commit per command, each with its tests and its lines in a new README "Repositories" section.
login --protocolDone: every command in the first slice is on main.
repo view:2169861repo list:ca52e41repo clone, andlogin --protocol:a154ecerepo create:53ff118repo fork:00863cerepo edit:b9a2070repo delete, and its confirmation:5dd73afOne departure from the plan:
repo create --remoteis a flag that always adds the repository asorigin, since an option with an optional value would take the next option as its value. What was deferred (archive, transfer, migrate and mirrors, topics, templates, starring, list filters, the README in view) is still reachable throughzfj op.