From 345968271dec38b33a32649d8cfb767c2806330d Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Wed, 24 Jun 2026 09:57:33 +0200 Subject: 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 --- skills/gitctl/SKILL.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'skills') 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 --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 push origin `), then you RE-RUN the same -- cgit v1.2.3