| Age | Commit message (Collapse) | Author | Files | Lines |
|
There was no way to change a repo's cgit section short of deleting and
recreating it or hand-editing cgitrc, which gitctl exists to prevent.
The helper gains move-repo, built from the existing pair: the block's
repo.* lines (desc included) are lifted out, remove_repo_block drops
them, insert_repo_block files them at the end of the target section's
span, so spacing follows the same rules as add and delete. It refuses a
repo not in cgit and a missing section, and is a no-op when the repo is
already there. The client's repo move ensures the section exists first.
Self-tests cover the block move, the file round trip and both refusals.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
gitctl repo delete <name> removes a repo from all three places it lives,
the inverse of repo create:
- gitolite stanza via remove_stanza (inverse of add_stanza), committed
and pushed FIRST so gitolite stops serving the repo before its bytes
move.
- cgit block via the new delete-repo helper verb (remove_repo_block,
inverse of insert_repo_block), backed up and synced.
- the bare repo is MOVED to TRASH_DIR (/var/lib/gitolite3/trash,
timestamped) with a .trashinfo breadcrumb, not rm, so it is
recoverable. A realpath check keeps the move one level under REPO_BASE.
Always confirms; the global -y is deliberately not honored (cmd_delete
never reads a.yes). Idempotent: a piece already gone is skipped.
Partial failure is resumable by re-running, like create. Both inverse
functions are pinned by add/insert-then-remove round-trip self-tests
plus middle/last/missing cases; trash_repo and do_delete_repo run on
temp dirs. Verified live: create then delete round-trips against the
real gitolite.conf, bare repo lands in the trash dir intact.
Helper changed: redeploy gitctl-helper to the server.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
|
New gitctl repo list / helper list-repos verb. Source of truth is the
bare repos on disk (REPO_BASE/*.git), not cgitrc, so private repos
(absent from cgitrc since cgit auto-discovery is off) show too. Each
repo is tagged PUB/PRIV by cgitrc membership, with its section and a
60-char description from the repo's description file. Client renders an
aligned table, green public / dim private on a TTY.
Adds repo_sections_from() primitive; find_repo_section becomes a thin
lookup over it. Self-tests cover the cgitrc parse and a temp-FS scan.
Updates README, SKILL.md, bash completion (repo list action), TODO.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
|
Thin CLI plus a server helper (run as the git user) to manage repos on a
personal gitolite3 + cgit server over a command=-restricted SSH key. Includes
the client, the helper, bash completion, a Claude Code skill, and docs.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|