Skip to main content

read_submodule_head_oid

Function read_submodule_head_oid 

Source
pub fn read_submodule_head_oid(sub_dir: &Path) -> Option<ObjectId>
Expand description

Read the HEAD commit OID from a submodule working tree directory.

Handles both embedded .git directories and gitdir: gitfiles pointing at .git/modules/... (or other locations). Returns None if the path is not a checkout or has no resolvable HEAD.