diff options
Diffstat (limited to 'merge-blobs.c')
| -rw-r--r-- | merge-blobs.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/merge-blobs.c b/merge-blobs.c index ee0a0e90c9..2f659fd014 100644 --- a/merge-blobs.c +++ b/merge-blobs.c @@ -1,10 +1,8 @@ -#include "cache.h" -#include "run-command.h" -#include "xdiff-interface.h" -#include "ll-merge.h" +#include "git-compat-util.h" +#include "merge-ll.h" #include "blob.h" #include "merge-blobs.h" -#include "object-store.h" +#include "object-store-ll.h" static int fill_mmfile_blob(mmfile_t *f, struct blob *obj) { @@ -12,7 +10,8 @@ static int fill_mmfile_blob(mmfile_t *f, struct blob *obj) unsigned long size; enum object_type type; - buf = read_object_file(&obj->object.oid, &type, &size); + buf = repo_read_object_file(the_repository, &obj->object.oid, &type, + &size); if (!buf) return -1; if (type != OBJ_BLOB) { @@ -36,7 +35,7 @@ static void *three_way_filemerge(struct index_state *istate, mmfile_t *their, unsigned long *size) { - int merge_status; + enum ll_merge_result merge_status; mmbuffer_t res; /* @@ -50,6 +49,9 @@ static void *three_way_filemerge(struct index_state *istate, istate, NULL); if (merge_status < 0) return NULL; + if (merge_status == LL_MERGE_BINARY_CONFLICT) + warning("Cannot merge binary files: %s (%s vs. %s)", + path, ".our", ".their"); *size = res.size; return res.ptr; @@ -75,7 +77,8 @@ void *merge_blobs(struct index_state *istate, const char *path, return NULL; if (!our) our = their; - return read_object_file(&our->object.oid, &type, size); + return repo_read_object_file(the_repository, &our->object.oid, + &type, size); } if (fill_mmfile_blob(&f1, our) < 0) |
