summaryrefslogtreecommitdiff
path: root/src/mask.ml
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2026-09-02 07:15:59 -0500
committerGitHub <noreply@github.com>2026-09-02 07:15:59 -0500
commit5b5c5f1277b165045123acae4a2470261fbad566 (patch)
tree8c43d13c61b282d889898cc03e55ffc25a82c62e /src/mask.ml
parent07636e49b3a04fdc76ac42bd65df88736c3945f1 (diff)
parentf7b4459ba3c6551f8d054456b0d5013a4b0e3ee1 (diff)
downloadvyos1x-config-rolling.tar.gz
vyos1x-config-rolling.zip
Merge pull request #92 from jestabro/reference-tree-utilsrolling
T9231: Add reference_tree utils to return paths satisfying condition
Diffstat (limited to 'src/mask.ml')
-rw-r--r--src/mask.ml10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mask.ml b/src/mask.ml
index 9edad33..5179876 100644
--- a/src/mask.ml
+++ b/src/mask.ml
@@ -10,7 +10,7 @@ module Mask_inclusive = struct
}
(* mask function; mask applied on right *)
- let diff_func ?recurse:_ (path : string list) res (m : change) =
+ let diff_func ?descent:_ (path : string list) res (m : change) =
(* alert exn Vytree.delete:
[Vytree.Empty_path] not possible since Unchanged pattern is only empty path
[Vytree.Nonexistent_path] not possible as called on existing config paths (res.left)
@@ -43,7 +43,7 @@ module Mask_exclusive = struct
}
(* mask function; mask applied on right *)
- let diff_func ?(recurse=true) (path : string list) res (m : change) =
+ let diff_func ?(descent=true) (path : string list) res (m : change) =
(* alert exn Vytree.delete:
[Vytree.Empty_path] not possible in pattern match case
[Vytree.Nonexistent_path] not possible as called on existing config paths (res.left)
@@ -57,13 +57,13 @@ module Mask_exclusive = struct
begin
match path with
| [] ->
- if recurse then
- (* in the diff function, recurse = true on an empty path means that the
+ if descent then
+ (* in the diff function, descent = true on an empty path means that the
trees are equal, hence exclude all: return default (empty) tree *)
{res with left = Config_tree.default}
else res
| _ ->
- if recurse || ((Vytree.is_terminal_path[@alert "-exn"]) res.right path) then
+ if descent || ((Vytree.is_terminal_path[@alert "-exn"]) res.right path) then
let tmp = (Vytree.delete[@alert "-exn"]) res.left path in
let left' = (Config_tree.prune_delete[@alert "-exn"]) tmp path in
{res with left = left'}