diff BUGFIX only replace op uses orig-value metadata
@@ -1123,6 +1123,7 @@ lyd_diff_merge_replace(struct lyd_node *diff_match, enum lyd_diff_op cur_op, con
LOGINT_RET(LYD_CTX(src_diff));
}
+ if (cur_op == LYD_DIFF_OP_REPLACE) {
/* compare values whether there is any change at all */
meta = lyd_find_meta(diff_match->meta, mod, "orig-value");
LY_CHECK_ERR_RET(!meta, LOGINT(LYD_CTX(diff_match)), LY_EINT);
@@ -1133,6 +1134,7 @@ lyd_diff_merge_replace(struct lyd_node *diff_match, enum lyd_diff_op cur_op, con
lyd_free_meta_single(meta);
LY_CHECK_RET(lyd_diff_change_op(diff_match, LYD_DIFF_OP_NONE));
}
+ }
/* modify the default flag */
diff_match->flags &= ~LYD_DEFAULT;
