Skip to main content

ref_part

Function ref_part 

Source
pub fn ref_part(s: &str) -> String
Expand description

s as one component of a git ref or a directory name: anything outside [A-Za-z0-9._-] becomes -, leading dots and dashes go, and a .lock suffix (which git forbids) is defused.