Expand description
Logic for git fetch --recurse-submodules (changed-submodule detection and config).
Mirrors the subset of Git’s submodule.c / submodule-config.c needed for recursive fetch:
revision walking with merge-aware gitlink diffs, per-submodule recurse mode, and checking
whether recorded gitlink commits are already present in a submodule repository.
Structs§
- Changed
Submodule Fetch - One submodule that gained new gitlink targets in
rev-list <tips> --not <neg>.
Enums§
- Fetch
Recurse Submodules fetch.recurseSubmodules/--recurse-submodulesmodes for fetch.
Functions§
- collect_
changed_ submodules_ for_ fetch - Walk
rev_list(repo, positive_hex, negative_hex)and collect submodule names whose gitlink targets changed, matching Git’scollect_changed_submodules+ name resolution. - is_
submodule_ active_ for_ fetch - Whether a submodule at
pathis active for fetch atsuper_oid(Gitis_tree_submodule_activesubset). - merge_
tips_ for_ changed_ walk - Parse
fetch.recurseSubmodulesor--recurse-submodules=<value>(Gitparse_fetch_recurse_submodules_arg). Build the positive OID list forrev-listwhen diffing fetched history (Gitref_tips_after∪ submodule tips). - might_
have_ submodules_ to_ fetch .gitmodulessays at least one submodule exists (path+url), or absorbed modules exist.- parse_
fetch_ recurse_ submodules_ arg - repo_
has_ absorbed_ submodules - Superproject has at least one submodule under
.git/modules/(Gitrepo_has_absorbed_submodules). - submodule_
git_ dir_ for_ fetch - Open the git directory for a submodule at
rel_path(work tree or.git/modules/fallback). - submodule_
has_ all_ commits - True when every OID in
commitsexists as a commit object insub_odband is reachable from some ref (git rev-list -n 1 <oids> --not --allis empty), matching Git’ssubmodule_has_commits.