diff options
| author | Danilo M. <danix@danix.xyz> | 2026-06-24 09:41:43 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-06-24 09:41:43 +0200 |
| commit | eeaba25642392532901cd4c95c23054e9a7ba2b3 (patch) | |
| tree | fef19a8b397ccdbaf1c828c3a1c268730e36a698 /TODO.md | |
| parent | 23bf41452709a632a7f1afe2d78551da767d8d56 (diff) | |
| download | gitctl-eeaba25642392532901cd4c95c23054e9a7ba2b3.tar.gz gitctl-eeaba25642392532901cd4c95c23054e9a7ba2b3.zip | |
feat: repo list - list all repos, public and private
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>
Diffstat (limited to 'TODO.md')
| -rw-r--r-- | TODO.md | 23 |
1 files changed, 13 insertions, 10 deletions
@@ -50,18 +50,21 @@ Design notes: stanza push? Or stanza first? Decide and document - partial failure (push fails after the move) should leave a clear, resumable state like create does. -## 2. list repos +## 2. list repos -- DONE -`gitctl repo list` - show repos known to the server, ideally with their section. +`gitctl repo list` is implemented. It lists EVERY bare repo on disk (the full +set, public and private), not just the cgit-exposed ones, because cgit +auto-discovery is off and private repos are not in cgitrc. Source of truth is +`REPO_BASE/*.git`, not cgitrc; cgitrc membership only tags a repo PUB vs PRIV +and supplies its section. Description comes from each repo's `description` file +(truncated 60). Client renders a table, green public / dim private on a TTY. +Helper verb `list-repos`; primitive `list_repos()` + `repo_sections_from()` +(the latter dedupes the old `find_repo_section`). Self-tests cover both the +cgitrc parse and a temp-FS scan. -- New helper verb `list-repos`: parse /etc/cgitrc for `repo.url=` lines and the - preceding `section=` (reuse `find_repo_section` / the section-tracking loop). - Print `<section>\t<url>` or similar. -- Cheap, read-only, no confirmation. Good first item - unblocks better bash - completion (complete repo names for `desc` / `delete` / `add-remote`) and - gives `delete` something to validate against. -- Alternative source: gitolite (`ssh git_push info` lists repos) but cgitrc is - the helper's own domain and already parsed; prefer it. +Still open from the original plan: extend bash completion to complete repo +NAMES (for `desc` / `delete` / `add-remote`) now that a list verb exists. The +`repo list` action itself is already in completion. ## 3. `-y` / `--yes` flag on `repo create` |
