Fix push with refspecs containing wildcards
[gitweb.git] / merge-recursive.c
index 8f72b2c079a68ac5cb9d1c90bb7b72fa779efb5f..4a82b741ae020376ac67b34d5fce86e8a87a3b5d 100644 (file)
@@ -680,6 +680,12 @@ static int ll_xdl_merge(const struct ll_merge_driver *drv_unused,
 {
        xpparam_t xpp;
 
+       if (buffer_is_binary(orig->ptr, orig->size) ||
+                       buffer_is_binary(src1->ptr, src1->size) ||
+                       buffer_is_binary(src2->ptr, src2->size))
+               return error("Cannot merge binary files: %s vs. %s\n",
+                       name1, name2);
+
        memset(&xpp, 0, sizeof(xpp));
        return xdl_merge(orig,
                         src1, name1,