init: show and confirm the target remote and source directory before creating a repo #707

Open
opened 2026-10-03 21:06:16 +00:00 by hexajon · 1 comment
Owner

madt_init creates a repo from a local directory and pushes it, but before it acts it does not surface two things I need to confirm:

  1. Where it creates the repo. The destination remote, instance, and owner/org are resolved from the current context and never shown. It is easy to create on the wrong forge without noticing.

  2. Which directory it uses as the source: the current directory, or a subdirectory. This is not stated.

Expected: before creating, print the resolved destination (host/instance, owner/org, repo name) and the source directory, then confirm. A single line such as "about to create <owner>/<name> on <host>, from <dir>", or a --dry-run, would stop a create from landing on the wrong forge.

Why it matters: a create picks whatever forge the current context resolves to, with no visible confirmation, and madtea cannot undo a repo creation (deletion is web-UI only). The same gap applies to madt_repos action=create.

Related: #685 (a repo= target on every tool) and #701 (origin-aware login, warn on mismatch) are adjacent; this one asks specifically that init and create show and confirm the destination remote and the working directory.

`madt_init` creates a repo from a local directory and pushes it, but before it acts it does not surface two things I need to confirm: 1. Where it creates the repo. The destination remote, instance, and owner/org are resolved from the current context and never shown. It is easy to create on the wrong forge without noticing. 2. Which directory it uses as the source: the current directory, or a subdirectory. This is not stated. Expected: before creating, print the resolved destination (host/instance, owner/org, repo name) and the source directory, then confirm. A single line such as "about to create `<owner>/<name>` on `<host>`, from `<dir>`", or a `--dry-run`, would stop a create from landing on the wrong forge. Why it matters: a create picks whatever forge the current context resolves to, with no visible confirmation, and madtea cannot undo a repo creation (deletion is web-UI only). The same gap applies to `madt_repos action=create`. Related: #685 (a `repo=` target on every tool) and #701 (origin-aware login, warn on mismatch) are adjacent; this one asks specifically that init and create show and confirm the destination remote and the working directory.
Author
Owner

Concrete case that triggered this: I ran init intending to create under an org, and it created the repo under my user account instead, with no prompt for the owner and no display that it was defaulting to the user. So the destination line this issue asks for should make the owner explicit (user vs org), and init should prompt for or confirm the owner when an org was intended.

Concrete case that triggered this: I ran init intending to create under an org, and it created the repo under my user account instead, with no prompt for the owner and no display that it was defaulting to the user. So the destination line this issue asks for should make the owner explicit (user vs org), and init should prompt for or confirm the owner when an org was intended.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sixfold-space/madtea#707
No description provided.