aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-30 17:44:35 +0100
committerDanilo M. <danix@danix.xyz>2026-10-30 17:44:35 +0100
commit98f7dde49951062c16f260467f4a421c2b2ca0a3 (patch)
tree6f0e9899269d9a874f6c907ae87c54fea5ebdc36 /README.md
parent4c1dc7e48169e2afed3bd90a7044ffd59cfd1029 (diff)
downloadgitctl-98f7dde49951062c16f260467f4a421c2b2ca0a3.tar.gz
gitctl-98f7dde49951062c16f260467f4a421c2b2ca0a3.zip
Add repo move: refile a public repo under another sectionHEADmaster
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>
Diffstat (limited to 'README.md')
-rw-r--r--README.md6
1 files changed, 5 insertions, 1 deletions
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`,