Skip to main content

ref_exists

Function ref_exists 

Source
pub fn ref_exists(repo: &Path, refname: &str) -> bool
Expand description

Does refname resolve to an existing object in repo? Uses git rev-parse --verify --quiet, which exits non-zero (quietly) when the ref doesn’t exist. Any spawn failure is treated as “doesn’t exist”.