Skip to main content

cone_covers

Function cone_covers 

Source
pub fn cone_covers(cone: &[String], path: &str) -> bool
Expand description

Whether cone covers path, in git’s cone spelling.

An empty cone covers everything, which is what a change that declared no scope means and what every change written before cones existed decodes to. A prefix matches on a directory boundary, so services/api covers services/api/main.rs and does not cover services/apiary/main.rs – the bug a bare starts_with would introduce, and the reason this is a named function with a test rather than an inline call.