From 9e1a4ca21e034233d6fc6299bb181f4e1634820e Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Mon, 8 Dec 2025 19:37:10 -0600 Subject: T8061: add boolean test for compatibility of path with reference tree --- src/reference_tree.ml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/reference_tree.ml') diff --git a/src/reference_tree.ml b/src/reference_tree.ml index a465a84..e3b5019 100644 --- a/src/reference_tree.ml +++ b/src/reference_tree.ml @@ -687,6 +687,15 @@ let potential_leaf_value rtree cpath = | [] -> false | _ -> is_leaf rtree ref_drop_last +let reference_path_exists rtree cpath = + if Util.is_empty cpath then false + else + if potential_leaf_value rtree cpath then true + else + let rpath = refpath rtree cpath in + if Util.is_empty rpath then false + else true + (* The 'edit' command can descend along a not-as-yet configured path, assuming that it is -- cgit v1.2.3