From 98f7dde49951062c16f260467f4a421c2b2ca0a3 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 30 Oct 2026 17:44:35 +0100 Subject: Add repo move: refile a public repo under another section 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 --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index 01b5af7..6168d6b 100644 --- a/README.md +++ b/README.md @@ -160,7 +160,7 @@ ssh git_push info # gitolite access check Or source it from `~/.bashrc`. It completes subcommands and flags, and pulls live values from the server (one ssh call each, only at the relevant position): section names after `--section`, and repo names for the `desc`, - `delete`, and `add-remote` arguments. + `move`, `delete`, and `add-remote` arguments. 6. (Optional) If you drive gitctl through a Claude Code agent, install the bundled skill so the agent knows when and how to use it: ``` @@ -177,6 +177,7 @@ gitctl repo create secrets --private gitctl repo list gitctl repo desc publisher "a new description" gitctl repo add-remote publisher --remote-name origin +gitctl repo move publisher --section Archived gitctl repo delete publisher gitctl sync ``` @@ -207,6 +208,9 @@ for the SSH key, so it is not fully unattended. private repos show too. A `VIS` column marks each `PUB` (present in cgitrc) or `PRIV`; on a terminal public rows are green and private dim. The description comes from each repo's `description` file, truncated to 60 chars. +- `repo move` refiles a public repo under another cgit section, creating the + section first if it is missing. Only cgitrc changes: the gitolite stanza and + the bare repo stay as they are. Idempotent. - `repo delete` removes a repo from all three places it lives: the gitolite stanza (committed and pushed first), the cgit block, and the bare repo, which is MOVED to the server's trash dir (`/var/lib/gitolite3/trash`, -- cgit v1.2.3