summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b541248)
raw | patch | inline | side by side (parent: b541248)
author | Junio C Hamano <gitster@pobox.com> | |
Fri, 29 Aug 2008 17:59:16 +0000 (10:59 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 31 Aug 2008 02:41:44 +0000 (19:41 -0700) |
This teaches the low-level ll_xdl_merge() routine to honor
merge.conflictstyle configuration variable, so that merge-recursive
strategy can show the conflicts in the style of user's choice.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
merge.conflictstyle configuration variable, so that merge-recursive
strategy can show the conflicts in the style of user's choice.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-merge-recursive.c | patch | blob | history | |
ll-merge.c | patch | blob | history |
index 43e55bf90154c51b94527b2ab7eb7c60fe36e9ec..c4349d4697cfffaa88ca5199c595120bec9bb7c8 100644 (file)
merge_rename_limit = git_config_int(var, value);
return 0;
}
- return git_default_config(var, value, cb);
+ return git_xmerge_config(var, value, cb);
}
int cmd_merge_recursive(int argc, const char **argv, const char *prefix)
diff --git a/ll-merge.c b/ll-merge.c
index 9837c842a3f215ebee7cbe9690e42e216fb5c76c..4a716146f67c5921646bcde0e8499fb37b993636 100644 (file)
--- a/ll-merge.c
+++ b/ll-merge.c
int virtual_ancestor)
{
xpparam_t xpp;
+ int style = 0;
if (buffer_is_binary(orig->ptr, orig->size) ||
buffer_is_binary(src1->ptr, src1->size) ||
}
memset(&xpp, 0, sizeof(xpp));
+ if (git_xmerge_style >= 0)
+ style = git_xmerge_style;
return xdl_merge(orig,
src1, name1,
src2, name2,
- &xpp, XDL_MERGE_ZEALOUS,
+ &xpp, XDL_MERGE_ZEALOUS | style,
result);
}
char *src, *dst;
long size;
const int marker_size = 7;
-
- int status = ll_xdl_merge(drv_unused, result, path_unused,
- orig, src1, NULL, src2, NULL,
- virtual_ancestor);
+ int status, saved_style;
+
+ /* We have to force the RCS "merge" style */
+ saved_style = git_xmerge_style;
+ git_xmerge_style = 0;
+ status = ll_xdl_merge(drv_unused, result, path_unused,
+ orig, src1, NULL, src2, NULL,
+ virtual_ancestor);
+ git_xmerge_style = saved_style;
if (status <= 0)
return status;
size = result->size;