diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-01-20 20:28:51 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-01-20 20:28:51 -0800 |
commit | 06dbc1ea5768618337bf11e5f64c4f9f14a68008 (patch) | |
tree | 049d23a7b372994b77c192df0537b232daa10d07 /merge-file.c | |
parent | df91d0e4d30ddc9bf2c55e3a63be9cb5318a409a (diff) | |
parent | 8588567c96490b8d236b1bc13f9bcb0dfa118efe (diff) | |
download | git-06dbc1ea5768618337bf11e5f64c4f9f14a68008.tar.gz |
Merge branch 'jc/conflict-marker-size'
* jc/conflict-marker-size:
rerere: honor conflict-marker-size attribute
rerere: prepare for customizable conflict marker length
conflict-marker-size: new attribute
rerere: use ll_merge() instead of using xdl_merge()
merge-tree: use ll_merge() not xdl_merge()
xdl_merge(): allow passing down marker_size in xmparam_t
xdl_merge(): introduce xmparam_t for merge specific parameters
git_attr(): fix function signature
Conflicts:
builtin-merge-file.c
ll-merge.c
xdiff/xdiff.h
xdiff/xmerge.c
Diffstat (limited to 'merge-file.c')
-rw-r--r-- | merge-file.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/merge-file.c b/merge-file.c index 3120a95f78..fd34d76e15 100644 --- a/merge-file.c +++ b/merge-file.c @@ -1,6 +1,7 @@ #include "cache.h" #include "run-command.h" #include "xdiff-interface.h" +#include "ll-merge.h" #include "blob.h" static int fill_mmfile_blob(mmfile_t *f, struct blob *obj) @@ -24,16 +25,13 @@ static void free_mmfile(mmfile_t *f) free(f->ptr); } -static void *three_way_filemerge(mmfile_t *base, mmfile_t *our, mmfile_t *their, unsigned long *size) +static void *three_way_filemerge(const char *path, mmfile_t *base, mmfile_t *our, mmfile_t *their, unsigned long *size) { - mmbuffer_t res; - xpparam_t xpp; int merge_status; + mmbuffer_t res; - memset(&xpp, 0, sizeof(xpp)); - merge_status = xdl_merge(base, our, ".our", their, ".their", - &xpp, XDL_MERGE_ZEALOUS, &res); - + merge_status = ll_merge(&res, path, base, + our, ".our", their, ".their", 0); if (merge_status < 0) return NULL; @@ -75,7 +73,7 @@ static int generate_common_file(mmfile_t *res, mmfile_t *f1, mmfile_t *f2) return xdi_diff(f1, f2, &xpp, &xecfg, &ecb); } -void *merge_file(struct blob *base, struct blob *our, struct blob *their, unsigned long *size) +void *merge_file(const char *path, struct blob *base, struct blob *our, struct blob *their, unsigned long *size) { void *res = NULL; mmfile_t f1, f2, common; @@ -108,7 +106,7 @@ void *merge_file(struct blob *base, struct blob *our, struct blob *their, unsign if (generate_common_file(&common, &f1, &f2) < 0) goto out_free_f2_f1; } - res = three_way_filemerge(&common, &f1, &f2, size); + res = three_way_filemerge(path, &common, &f1, &f2, size); free_mmfile(&common); out_free_f2_f1: free_mmfile(&f2); |