pub fn gitlink_broken_gitdir(sub_root: &Path) -> Option<PathBuf>Expand description
When sub_root holds a broken gitlink — a .git file whose gitdir:
pointer names a directory that no longer exists (e.g. the submodule’s git
directory was moved out of .git/modules/) — return that unresolved gitdir
path. git’s status / diff-index fail fatally (“not a git repository: …”)
here. Returns None for a valid gitlink (a .git directory, or a .git
file with a live gitdir) and for an unpopulated gitlink (no .git entry at
all), both of which git treats as non-fatal (the latter as unchanged).