You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GitSync: honor arbitrary clone depth on sync, not just --depth 1 #531
GitSync can express shallow vs. full but not an arbitrary clone depth. GitSync.obtain() hardcodes the depth to 1 whenever git_shallow is set, even though the lower-level Git.clone() already accepts any depth. Exposing a depth attribute on GitSync would let callers request --depth N.
The clone command already supports arbitrary depth: src/libvcs/cmd/git.py L368 — depth: int | None = None.
Proposal
Read an optional depth: int from GitSync kwargs (alongside git_shallow).
In obtain(), pass depth=self.depth to Git.clone() when set, falling back to the current 1 if git_shallow else None behavior for compatibility.
Optionally let update_repo()/fetch() deepen or unshallow when depth changes, mirroring Git.fetch(depth=..., unshallow=...).
Why
Downstream tools (e.g. vcspull) can record a per-repository shallow state today, but only as a boolean because the sync path can't honor a numeric depth. A depth attribute on GitSync would let them persist and apply --depth N.
Activity
sync/git(feat[GitSync]): Honor arbitrary clone depth
tests(sync/git[GitSync]): Cover obtain() clone depth
docs(CHANGES) note GitSync arbitrary clone depth
sync/git(feat[GitSync]): Support for clone depth
tests(sync/git[GitSync]): Cover obtain() clone depth
docs(CHANGES) note GitSync arbitrary clone depth
sync/git(feat[GitSync]): Support arbitrary clone depth (#535)