Skip to content

Commit e2375d6

Browse files
committed
cli(add[help]) Cover every add permutation
why: the examples showed three path-mode invocations, leaving the URL argument, --name, --pin, --shallow, --depth, --file, --yes and --no-merge with no worked example in `vcspull add --help` or in the generated docs, which render from this same block. what: - Show both positional modes, the --name fallback for a URL with no nameable segment, and the recorded-remote form - Group revision and clone-depth examples under "Pinning" and unattended invocations under "Automation", following the grouped shape tmuxp's search help uses
1 parent 7d7fb50 commit e2375d6

1 file changed

Lines changed: 21 additions & 4 deletions

File tree

src/vcspull/cli/__init__.py

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,28 @@ def build_description(
203203
None,
204204
[
205205
"vcspull add ~/code/mylib",
206+
"vcspull add https://github.com/example/mylib.git",
206207
"vcspull add ~/src/mylib --workspace ~/code",
207-
(
208-
"vcspull add ~/code/mylib "
209-
"--url https://github.com/example/mylib.git --dry-run"
210-
),
208+
"vcspull add https://git.example.com/.git --name mylib",
209+
("vcspull add ~/code/mylib --url https://github.com/example/mylib.git"),
210+
],
211+
),
212+
(
213+
"Pinning",
214+
[
215+
"vcspull add ~/code/mylib --pin v1.0",
216+
"vcspull add git+https://github.com/example/mylib.git@v1.0",
217+
"vcspull add ~/code/mylib --shallow",
218+
"vcspull add ~/code/mylib --depth 50",
219+
],
220+
),
221+
(
222+
"Automation",
223+
[
224+
"vcspull add ~/code/mylib --dry-run",
225+
"vcspull add https://github.com/example/mylib.git --yes",
226+
"vcspull add ~/code/mylib --file ~/configs/python.yaml",
227+
"vcspull add ~/code/mylib --no-merge",
211228
],
212229
),
213230
),

0 commit comments

Comments
 (0)