summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 153920d)
raw | patch | inline | side by side (parent: 153920d)
author | Junio C Hamano <junkio@cox.net> | |
Wed, 18 Apr 2007 19:18:25 +0000 (12:18 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 18 Apr 2007 19:30:49 +0000 (12:30 -0700) |
This allows [merge "drivername"] to have a variable "recursive"
that names a different low-level merge driver to be used when
merging common ancestors to come up with a virtual ancestor.
Signed-off-by: Junio C Hamano <junkio@cox.net>
that names a different low-level merge driver to be used when
merging common ancestors to come up with a virtual ancestor.
Signed-off-by: Junio C Hamano <junkio@cox.net>
merge-recursive.c | patch | blob | history |
diff --git a/merge-recursive.c b/merge-recursive.c
index 0f5c28eaff1ccbfd2abd288e9c72d43d86f1d20d..7b5ca8e717217011ffde95434e58d47e401c40e5 100644 (file)
--- a/merge-recursive.c
+++ b/merge-recursive.c
const char *name;
const char *description;
ll_merge_fn fn;
+ const char *recursive;
struct ll_merge_driver *next;
char *cmdline;
};
return 0;
}
+ if (!strcmp("recursive", ep)) {
+ if (!value)
+ return error("%s: lacks value", var);
+ fn->recursive = strdup(value);
+ return 0;
+ }
+
return 0;
}
merge_attr = git_path_check_merge(a->path);
driver = find_ll_merge_driver(merge_attr);
+ if (index_only && driver->recursive) {
+ merge_attr = git_attr(driver->recursive, strlen(driver->recursive));
+ driver = find_ll_merge_driver(merge_attr);
+ }
merge_status = driver->fn(driver, a->path,
&orig, &src1, name1, &src2, name2,
result_buf);