diff options
| author | John Estabrook <jestabro@vyos.io> | 2026-08-12 14:54:41 -0500 |
|---|---|---|
| committer | John Estabrook <jestabro@vyos.io> | 2026-08-25 14:10:26 -0500 |
| commit | ba55ca80346293badcd98c78a38d687c1c5ecd42 (patch) | |
| tree | 5f7dafd4038ed37610db8262ed6fe68cddb1405f /src/diff.ml | |
| parent | 07636e49b3a04fdc76ac42bd65df88736c3945f1 (diff) | |
| download | vyos1x-config-ba55ca80346293badcd98c78a38d687c1c5ecd42.tar.gz vyos1x-config-ba55ca80346293badcd98c78a38d687c1c5ecd42.zip | |
T9231: change option name from recurse to descent
The term 'recurse' has other uses; change to the term 'descent', which
more aptly describes 'including descendants of a node'.
Diffstat (limited to 'src/diff.ml')
| -rw-r--r-- | src/diff.ml | 6 |
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) |
