Skip to content

Commit 4384d45

Browse files
committed
docs(configuration[schema]) Document rev and shallow repo keys
why: The per-repo `rev:` and `shallow:` keys are now writable by add/discover but the configuration guide only covered worktrees, pinning, and remotes. what: - Add "Revision pinning" and "Shallow clones" sections, each with a YAML example and the corresponding CLI flag
1 parent 562af2f commit 4384d45

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

docs/configuration/index.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,42 @@ Optional fields:
119119

120120
See {ref}`cli-worktree` for full command documentation.
121121

122+
## Revision pinning
123+
124+
A `rev:` key pins a repository to a commit, tag, or branch, which {ref}`cli-sync`
125+
checks out. This lets a config capture a reproducible snapshot instead of
126+
tracking the branch tip. It is distinct from `options.pin` (see
127+
{ref}`config-pin`), which guards the config entry from being overwritten rather
128+
than pinning a git ref.
129+
130+
```yaml
131+
~/code/:
132+
flask:
133+
repo: git+https://github.com/pallets/flask.git
134+
rev: v3.0.0
135+
```
136+
137+
`vcspull add <path> --pin <ref>` and `vcspull discover <dir> --pin <ref>` record
138+
this key when importing an existing checkout. See {ref}`cli-add` and
139+
{ref}`cli-discover`.
140+
141+
## Shallow clones
142+
143+
A `shallow: true` key makes {ref}`cli-sync` clone the repository with
144+
`--depth 1`, trading git history for disk and time—useful for workspaces with
145+
many repositories.
146+
147+
```yaml
148+
~/code/:
149+
flask:
150+
repo: git+https://github.com/pallets/flask.git
151+
shallow: true
152+
```
153+
154+
`vcspull add` and `vcspull discover` detect an existing shallow checkout
155+
automatically and record `shallow: true`; the `--shallow` flag forces it on even
156+
for a full checkout.
157+
122158
(config-pin)=
123159

124160
## Repository pinning

0 commit comments

Comments
 (0)