Skip to main content

sync_root_for

Function sync_root_for 

Source
pub fn sync_root_for(path: &Path) -> PathBuf
Expand description

Walk up from path to the git common-dir parent, falling back to path itself when no git root is found.

Single helper for callers that have a plain &Path instead of a ResolvedProject (test fixtures, watcher callbacks, freshness gate helpers). Production CLI paths should prefer ResolvedProject::sync_root which avoids the redundant walk.