summaryrefslogtreecommitdiff
path: root/src/commit.ml
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2025-04-02 21:41:13 -0500
committerJohn Estabrook <jestabro@vyos.io>2025-04-04 12:36:50 -0500
commiteeb758f406f0cc27ab7863dc17eec00c24f2c0b6 (patch)
tree47ccceb8e72c4a02ceb282a0c5db7e06c93baaf8 /src/commit.ml
parentf389a749097d2a265d1ce1b757804af70a7199ba (diff)
downloadvyconf-eeb758f406f0cc27ab7863dc17eec00c24f2c0b6.tar.gz
vyconf-eeb758f406f0cc27ab7863dc17eec00c24f2c0b6.zip
T7302: add dry_run field and update branch
Diffstat (limited to 'src/commit.ml')
-rw-r--r--src/commit.ml3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/commit.ml b/src/commit.ml
index a735697..19c9844 100644
--- a/src/commit.ml
+++ b/src/commit.ml
@@ -227,11 +227,12 @@ let commit_update c_data =
| Some _ -> config_result_update acc_data nd
in List.fold_left func c_data c_data.node_list
-let make_commit_data rt at wt id =
+let make_commit_data ?(dry_run=false) rt at wt id =
let diff = CD.diff_tree [] at wt in
let del_list, add_list = calculate_priority_lists rt diff in
{ default_commit_data with
session_id = id;
+ dry_run = dry_run;
config_diff = diff;
config_result = CT.get_subtree diff ["inter"];
node_list = del_list @ add_list; }