fetch-pack.c: use oidset to check existence of loose object
[gitweb.git] / merge-recursive.c
index 9d53f30111c85c2c06f957b394a31a07e68dfe8b..6ff971f9a2a8e251b8762d75214697698e2d1ce6 100644 (file)
@@ -1028,8 +1028,9 @@ static int merge_file_1(struct merge_options *o,
                        if ((merge_status < 0) || !result_buf.ptr)
                                ret = err(o, _("Failed to execute internal merge"));
 
-                       if (!ret && write_sha1_file(result_buf.ptr, result_buf.size,
-                                                   blob_type, result->oid.hash))
+                       if (!ret &&
+                           write_object_file(result_buf.ptr, result_buf.size,
+                                             blob_type, &result->oid))
                                ret = err(o, _("Unable to add %s to database"),
                                          a->path);