diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/superpowers/specs/2026-10-19-clone-tool-design.md | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/docs/superpowers/specs/2026-10-19-clone-tool-design.md b/docs/superpowers/specs/2026-10-19-clone-tool-design.md index 09d3be5..fde9002 100644 --- a/docs/superpowers/specs/2026-10-19-clone-tool-design.md +++ b/docs/superpowers/specs/2026-10-19-clone-tool-design.md @@ -32,14 +32,18 @@ timeout = 300 `examples/tools/clone.sh`: - Parses `https://host/owner/repo` and `git@host:owner/repo` alike; `repo` - is the last path segment with a trailing `/` and a `.git` suffix removed. - Both `host` and `repo` are validated as plain names, so neither can - escape the tree. + is the last path segment with a trailing `/` and a `.git` suffix removed, + and `owner` is the segment before it (a nested group keeps only its last + segment). `host`, `repo` and `owner` are validated as plain names, so + none can escape the tree. - Resolves `host -> folder` from the mapping file. Absent, it is seeded with `github.com -> GITHUB`, `gitlab.com -> GITLAB`, `forge.slackware.nl -> FORGE`. -- Target is `<root>/<folder>/<repo>` (`CLONE_ROOT`, default - `~/Programming/GIT`). +- Target is `<root>/<folder>/<owner>-<repo>` (`CLONE_ROOT`, default + `~/Programming/GIT`). The name is just `<repo>` when the URL carries no + owner (`git@host:repo.git`) or when `owner` and `repo` are the same + (`firefly-iii/firefly-iii`), so a generic repo name like `wallpapers` + becomes `evgen2571-wallpapers` while a self-named one is not doubled. - Known host, target free: `git clone` and report it. No question. - Unknown host: prints the folder to offer (hostname without its last label, uppercased: `codeberg.org -> CODEBERG`) and does nothing. |
