pub struct MoveHeadContext {
pub active: bool,
pub populated: bool,
pub has_dirty_index: bool,
}Expand description
Everything the move-head decision needs about one submodule at one path.
The caller resolves these via whatever I/O it already has (the CLI reads the
submodule’s .git + index; the unpack-trees engine reads the in-memory
index entry + on-disk submodule).
Fields§
§active: boolis_submodule_active(the_repository, path) — is the submodule active in
this superproject (via submodule.<name>.active / active-pathspec /
a configured url)? An inactive submodule is never touched, so a move can
never lose its data.
populated: boolis_submodule_populated_gently(path, ...) — does <path>/.git resolve
to a real git repository? An unpopulated submodule has no checked-out
work to lose when old_head is set.
has_dirty_index: boolsubmodule_has_dirty_index(sub) — does the submodule have staged but
uncommitted changes relative to its HEAD (git diff-index --quiet --cached HEAD is non-zero)? A dirty index blocks a non-forced move.