Skip to main content

is_common_git_path

Function is_common_git_path 

Source
pub fn is_common_git_path(rel: &str) -> bool
Expand description

True when the relative git-dir path rel belongs to the common (shared) directory, mirroring Git’s update_common_dir decision (git/path.c).

rel is the component after the git dir (e.g. logs/refs, config, HEAD). Any trailing .lock suffix is ignored for the decision, exactly as update_common_dir strips LOCK_SUFFIX before consulting the trie.