summaryrefslogtreecommitdiff
path: root/xdiff-interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'xdiff-interface.c')
-rw-r--r--xdiff-interface.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/xdiff-interface.c b/xdiff-interface.c
index b9b0db8d86..01f14fb50f 100644
--- a/xdiff-interface.c
+++ b/xdiff-interface.c
@@ -309,6 +309,21 @@ void xdiff_set_find_func(xdemitconf_t *xecfg, const char *value, int cflags)
}
}
+void xdiff_clear_find_func(xdemitconf_t *xecfg)
+{
+ if (xecfg->find_func) {
+ int i;
+ struct ff_regs *regs = xecfg->find_func_priv;
+
+ for (i = 0; i < regs->nr; i++)
+ regfree(&regs->array[i].re);
+ free(regs->array);
+ free(regs);
+ xecfg->find_func = NULL;
+ xecfg->find_func_priv = NULL;
+ }
+}
+
int git_xmerge_style = -1;
int git_xmerge_config(const char *var, const char *value, void *cb)