worktree: rename is_worktree_locked to worktree_lock_reason
[gitweb.git] / builtin / merge-tree.c
index bf01e05808313da20ed73c37d0d150c4ddb45587..8fc108d305a33c4ba615837b60bda8175f2fb882 100644 (file)
@@ -1,6 +1,8 @@
 #include "builtin.h"
 #include "tree-walk.h"
 #include "xdiff-interface.h"
+#include "object-store.h"
+#include "repository.h"
 #include "blob.h"
 #include "exec-cmd.h"
 #include "merge-blobs.h"
@@ -74,7 +76,7 @@ static void *result(struct merge_list *entry, unsigned long *size)
        their = NULL;
        if (entry)
                their = entry->blob;
-       return merge_blobs(path, base, our, their, size);
+       return merge_blobs(&the_index, path, base, our, their, size);
 }
 
 static void *origin(struct merge_list *entry, unsigned long *size)
@@ -153,7 +155,7 @@ static int same_entry(struct name_entry *a, struct name_entry *b)
 {
        return  a->oid &&
                b->oid &&
-               !oidcmp(a->oid, b->oid) &&
+               oideq(a->oid, b->oid) &&
                a->mode == b->mode;
 }
 
@@ -169,7 +171,7 @@ static struct merge_list *create_entry(unsigned stage, unsigned mode, const stru
        res->stage = stage;
        res->path = path;
        res->mode = mode;
-       res->blob = lookup_blob(oid);
+       res->blob = lookup_blob(the_repository, oid);
        return res;
 }