summaryrefslogtreecommitdiff
path: root/src/diff.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/diff.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/diff.ml')
-rw-r--r--src/diff.ml6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/diff.ml b/src/diff.ml
index 6a87d93..80c3654 100644
--- a/src/diff.ml
+++ b/src/diff.ml
@@ -51,7 +51,7 @@ let update_path path left_opt right_opt =
module type Place = sig
type t
- val diff_func : ?recurse:bool -> string list -> t -> change -> t
+ val diff_func : ?descent:bool -> string list -> t -> change -> t
end
module Diff (P: Place) = struct
@@ -62,12 +62,12 @@ module Diff (P: Place) = struct
| Some _, None -> P.diff_func path res Subtracted
| None, Some _ -> P.diff_func path res Added
| Some left_node, Some right_node when left_node = right_node ->
- P.diff_func ~recurse:true path res Unchanged
+ P.diff_func ~descent:true path res Unchanged
| Some left_node, Some right_node when left_node ^~ right_node ->
let values = (data_of right_node).values in
P.diff_func path res (Updated values)
| Some left_node, Some right_node ->
- let ret = P.diff_func ~recurse:false path res Unchanged in
+ let ret = P.diff_func ~descent:false path res Unchanged in
List.fold_left (diff_calc path) ret (opt_zip left_node right_node)
let diff (init: P.t) l r = diff_calc [] init (Option.some l, Option.some r)