Skip to main content

Module push_submodules

Module push_submodules 

Source
Expand description

Submodule recursion for git push (--recurse-submodules).

Mirrors the subset of Git’s submodule.c / transport.c logic needed for check, on-demand, and only modes over local (file) transport.

Enums§

PushRecurseSubmodules
How git push should recurse into submodules.

Functions§

collect_changed_gitlinks_for_push
Collect submodule paths and the gitlink OIDs introduced along the walk git log <tips> --not --remotes=<remote>, using merge-aware diffs like Git’s collect_changed_submodules.
find_unpushed_submodule_paths
Submodule paths that still need to be pushed to remote_name (non-empty rev-list against remote-tracking).
format_unpushed_submodules_error
Print Git’s standard “unpushed submodule” error and return a formatted anyhow-friendly message.
head_ref_short_name
Resolve HEAD in git_dir to a short branch name when symbolic; "HEAD" when detached.
parse_push_recurse_submodules_arg
Parse --recurse-submodules=<value> or push.recurseSubmodules / submodule.recurse.
submodule_commits_fully_pushed
Whether the gitlink OIDs are commits present in the submodule repo and reachable from some ref.
submodule_gitlinks_touched_in_range
True when walking superproject commits in (excl..incl] introduces or changes a submodule gitlink (matches Git’s submodule_touches_in_range in submodule.c).
submodule_needs_push_to_remote
True if oids contains commits not reachable from refs/remotes/<remote_name>/ in the submodule.
submodule_worktree_path
Work tree path for a submodule at rel_path in the superproject.
validate_submodule_push_refspecs
Validate refspecs for nested submodule push (submodule--helper push-check subset).
verify_push_gitlinks_are_commits
Ensure every gitlink OID in changed names a commit object (not a tag/tree/blob).