diff options
| author | Danilo M. <danix@danix.xyz> | 2026-06-24 10:19:30 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-06-24 10:19:30 +0200 |
| commit | 02a5ae2adc2df39fc78fd7e29904ff473e9266a0 (patch) | |
| tree | bbe270a6302526476147430ce7614e17ac7cc1df /completions | |
| parent | 345968271dec38b33a32649d8cfb767c2806330d (diff) | |
| download | gitctl-02a5ae2adc2df39fc78fd7e29904ff473e9266a0.tar.gz gitctl-02a5ae2adc2df39fc78fd7e29904ff473e9266a0.zip | |
feat: repo delete - remove repo, move bare repo to trash
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>
Diffstat (limited to 'completions')
| -rw-r--r-- | completions/gitctl.bash | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/completions/gitctl.bash b/completions/gitctl.bash index 3d072fe..929346d 100644 --- a/completions/gitctl.bash +++ b/completions/gitctl.bash @@ -36,7 +36,7 @@ _gitctl() { 2) case $group in sections) COMPREPLY=($(compgen -W "list add" -- "$cur")) ;; - repo) COMPREPLY=($(compgen -W "create list desc add-remote" -- "$cur")) ;; + repo) COMPREPLY=($(compgen -W "create list desc add-remote delete" -- "$cur")) ;; esac return ;; esac |
