Skip to main content

submodule_dirt_checked

Function submodule_dirt_checked 

Source
pub fn submodule_dirt_checked(sub_root: &Path) -> Result<u8>
Expand description

As submodule_dirt, but fail the way git does when the gitlink is populated yet broken — a .git file whose gitdir: pointer is gone (the submodule’s git directory was moved/deleted). git’s status / diff-index die with “fatal: not a git repository: …” in this case; an unpopulated gitlink (no .git at all) stays clean. Used on the status paths so git status and git describe --dirty surface the breakage (and --broken can tolerate it).