Skip to main content

detect

Function detect 

Source
pub fn detect(dir: &Path) -> Detection
Expand description

Read the origin remote of dir and map it, without judging.

The read answers for dir alone: the variables a running hook exports are scrubbed, so an inherited GIT_DIR cannot answer with another repository’s remote. The child runs with dir as its working directory rather than through -C: where dir is the kernel’s link to a held directory, the change of directory happens in the child before the exec closes the descriptor, so the child stands in the held directory itself, whatever the pathname has since become.