Skip to content

Commit 597104f

Browse files
committed
docs(cli/sync[update_repo]) Correct the shallow/depth translation comment
why: The comment omitted the actual reason for applying the keys post-construction (libvcs names shallow `git_shallow`, so it must be translated) and overstated "leaking git-only kwargs into the svn/hg sync constructors" — HgSync/SvnSync absorb unknown **kwargs harmlessly, so that was never the failure mode. what: - State the real rationale: translate shallow->git_shallow, apply both as attributes for git only, and let obtain() resolve precedence - Comment-only; no behavior change
1 parent 902c002 commit 597104f

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/vcspull/cli/sync.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1927,11 +1927,11 @@ def update_repo(
19271927

19281928
repo_dict["progress_callback"] = progress_callback or progress_cb
19291929

1930-
# vcspull surfaces options.shallow/options.depth as flat ``shallow``/
1931-
# ``depth`` keys on the ConfigDict. libvcs names them ``git_shallow``/
1932-
# ``depth``; translate and apply them as attributes after construction so
1933-
# they reach obtain() (depth wins over shallow) without leaking git-only
1934-
# kwargs into the svn/hg sync constructors.
1930+
# The ConfigDict carries options.shallow/options.depth as flat ``shallow``/
1931+
# ``depth`` keys. libvcs's GitSync names the former ``git_shallow``, so
1932+
# translate it; apply both as attributes after construction and only for
1933+
# git. ``obtain()`` then resolves precedence (an explicit depth wins over
1934+
# ``git_shallow``).
19351935
git_shallow = bool(repo_dict.pop("shallow", False))
19361936
git_depth = repo_dict.pop("depth", None)
19371937

0 commit comments

Comments
 (0)