Skip to main content

check_submodule_name

Function check_submodule_name 

Source
pub fn check_submodule_name(name: &str) -> bool
Expand description

Port of check_submodule_name (git submodule-config.c). Returns true if name is syntactically acceptable as a .gitmodules subsection, false otherwise (git’s 0 vs -1). Rejects empty names and any .. path component (using the cross-platform separator set / and \ so the rule is OS-independent).