diff FEATURE distinguish added subtree in callback
If a whole subtree is added when merging 2
diffs, the callback is called with one param
being NULL since it is redundant.
diff --git a/src/diff.c b/src/diff.c
index 2a72f85..257e18f 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -1470,8 +1470,8 @@
LY_CHECK_RET(lyd_diff_change_op(diff_node, src_op));
if (diff_cb) {
- /* call callback */
- LY_CHECK_RET(diff_cb(src_diff, diff_node, cb_data));
+ /* call callback with no source diff node since it was duplicated and just added */
+ LY_CHECK_RET(diff_cb(NULL, diff_node, cb_data));
}
/* update diff parent */