depot: replace --target local with --out DIR #67

Merged
archvillainette merged 1 commits from depot-out-flag into main 2026-07-28 11:07:59 +00:00
1 Commits
Author SHA1 Message Date
archvillainette 6bbc2c3a83 feat(depot): select a depot tree on disk with --out DIR
ci / ci (pull_request) Successful in 3m20s
`depot status` and `depot get` chose a local depot tree with `--target
local`, resolving the root from `DEPOT_DIR`. That split one decision over
two flags and left `--target local` valid with no directory anywhere.

Adopt the nwsync convention instead: `--out DIR` names the tree on disk in
the same breath as choosing it, and `--target` now names remote backends
only. The two are mutually exclusive. `--target local` stays as a
deprecated alias for `--out $DEPOT_DIR` so existing callers keep working,
and `status --source` is now ignored with a warning instead of silently
accepted.

Also split positionals off by hand in `depot get`, so the documented
`depot get <sha> <dest> --out DIR` form parses its flags at all — Go's
flag package stops at the first positional.

Closes #66
2026-07-28 10:15:14 +02:00