perf: add test for writing the index
[gitweb.git] / builtin / merge-tree.c
index cdeb6562da43b039eca1dd822c43f8e780d34e01..f12da292cf91b1ecb9fc785fd50bd1ef83b361e9 100644 (file)
@@ -168,7 +168,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->hash);
+       res->blob = lookup_blob(oid);
        return res;
 }
 
@@ -347,12 +347,12 @@ static void merge_trees(struct tree_desc t[3], const char *base)
 
 static void *get_tree_descriptor(struct tree_desc *desc, const char *rev)
 {
-       unsigned char sha1[20];
+       struct object_id oid;
        void *buf;
 
-       if (get_sha1(rev, sha1))
+       if (get_oid(rev, &oid))
                die("unknown rev %s", rev);
-       buf = fill_tree_descriptor(desc, sha1);
+       buf = fill_tree_descriptor(desc, oid.hash);
        if (!buf)
                die("%s is not a tree", rev);
        return buf;