aboutsummaryrefslogtreecommitdiffstats
path: root/skills
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-06-24 09:57:33 +0200
committerDanilo M. <danix@danix.xyz>2026-06-24 09:57:33 +0200
commit345968271dec38b33a32649d8cfb767c2806330d (patch)
treedf90e30c02189a38628bc10829fecfebec0b53d4 /skills
parenteeaba25642392532901cd4c95c23054e9a7ba2b3 (diff)
downloadgitctl-345968271dec38b33a32649d8cfb767c2806330d.tar.gz
gitctl-345968271dec38b33a32649d8cfb767c2806330d.zip
feat: global -y/--yes flag to skip additive confirmations
repo create's y/N push confirmation can now be skipped with -y. The flag is global (top-level parser), so it goes before the subcommand: gitctl -y repo create ... . The diff is still printed and an auto-confirmed note shown. -y does NOT bypass SSH key auth (the phase-1 push still needs the password / smartcard touch), so creation is never fully unattended. Hard wall: -y is never honored by a future destructive delete; the flag help, a client comment, and TODO item 1 all record this. Bash completion offers -y at the top level and transparently skips a leading -y when resolving the subcommand. Self-test pins the parse round-trip. Client-only change; the server helper is unchanged, no redeploy needed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'skills')
-rw-r--r--skills/gitctl/SKILL.md14
1 files changed, 10 insertions, 4 deletions
diff --git a/skills/gitctl/SKILL.md b/skills/gitctl/SKILL.md
index 9d6ac17..8660669 100644
--- a/skills/gitctl/SKILL.md
+++ b/skills/gitctl/SKILL.md
@@ -36,6 +36,11 @@ Phase 1 edits the local gitolite-admin clone, shows the diff, **asks y/N**,
commits, pushes, then polls until gitolite builds the bare repo. Phase 2 adds
it to cgit under the section and (if given) sets the description.
+Pass global **`-y` BEFORE the subcommand** (`gitctl -y repo create ...`) to skip
+the y/N. The diff still prints. `-y` does NOT remove the SSH-key step: the
+phase-1 push still needs the key password / smartcard touch, so creation is
+still not fully unattended.
+
Then wire up the new repo for the user:
```
gitctl repo add-remote <name> --remote-name origin
@@ -44,10 +49,11 @@ git push -u origin master
## Gotchas
-- **`repo create` prompts y/N -> it needs a TTY.** Do not run it through a
- non-interactive pipe expecting it to just work; let the user confirm, or have
- them run it. The phase-1 push may also require a hardware-key touch/PIN, which
- only works interactively.
+- **`repo create` prompts y/N -> use `gitctl -y repo create ...` to skip it**
+ (the `-y` is global, so it goes before `repo`). Even with `-y` the phase-1
+ push may require the SSH key password or a hardware-key touch/PIN, which only
+ works interactively, so creation is never fully unattended. Without `-y` it
+ needs a TTY for the y/N; do not pipe it non-interactively expecting success.
- **If the push fails after the local commit** (key refused, auth failure): the
gitolite-admin commit is made but unpushed. The user pushes manually
(`git -C <admin-clone> push origin <branch>`), then you RE-RUN the same