Skip to main content

relative_path_bytes

Function relative_path_bytes 

Source
pub fn relative_path_bytes(input: &[u8], prefix: &[u8]) -> Vec<u8> 
Expand description

Render input relative to prefix, a faithful byte-level port of git’s relative_path() (path.c) for the POSIX, both-relative case (no DOS drive). prefix is the cwd prefix and must end with / when non-empty, matching git’s cmd_prefix. Emits ../ for each prefix component not shared with input, then the unshared tail of input.