]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/checkout.c
Merge branch 'en/remerge-diff'
[thirdparty/git.git] / builtin / checkout.c
index 8f010412a9cdc957ff8ceac841c7cb14b6d55b5a..f6e65fedfa2bbbc3cf7d180dc26e9881c6c0c2d6 100644 (file)
@@ -246,6 +246,7 @@ static int checkout_merged(int pos, const struct checkout *state,
        struct cache_entry *ce = active_cache[pos];
        const char *path = ce->name;
        mmfile_t ancestor, ours, theirs;
+       enum ll_merge_result merge_status;
        int status;
        struct object_id oid;
        mmbuffer_t result_buf;
@@ -276,13 +277,16 @@ static int checkout_merged(int pos, const struct checkout *state,
        memset(&ll_opts, 0, sizeof(ll_opts));
        git_config_get_bool("merge.renormalize", &renormalize);
        ll_opts.renormalize = renormalize;
-       status = ll_merge(&result_buf, path, &ancestor, "base",
-                         &ours, "ours", &theirs, "theirs",
-                         state->istate, &ll_opts);
+       merge_status = ll_merge(&result_buf, path, &ancestor, "base",
+                               &ours, "ours", &theirs, "theirs",
+                               state->istate, &ll_opts);
        free(ancestor.ptr);
        free(ours.ptr);
        free(theirs.ptr);
-       if (status < 0 || !result_buf.ptr) {
+       if (merge_status == LL_MERGE_BINARY_CONFLICT)
+               warning("Cannot merge binary files: %s (%s vs. %s)",
+                       path, "ours", "theirs");
+       if (merge_status < 0 || !result_buf.ptr) {
                free(result_buf.ptr);
                return error(_("path '%s': cannot merge"), path);
        }