Bind Git worktree helpers to a trusted executable

This commit is contained in:
Chris Bookholt
2026-07-01 07:45:11 -07:00
parent ec69e784c2
commit 2ca4f55c0d
9 changed files with 751 additions and 37 deletions
@@ -0,0 +1,10 @@
use super::*;
#[test]
fn path_containment_uses_component_boundaries() {
let root = Path::new("/repo/root");
assert!(path_is_within(Path::new("/repo/root"), root));
assert!(path_is_within(Path::new("/repo/root/config"), root));
assert!(!path_is_within(Path::new("/repo/rooted/config"), root));
assert!(!path_is_within(Path::new("/repo"), root));
}