builtin/merge-tree: convert remaining caller of get_sha1 to object_id
authorbrian m. carlson <sandals@crustytoothpaste.net>
Thu, 13 Jul 2017 23:49:19 +0000 (23:49 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 17 Jul 2017 20:54:37 +0000 (13:54 -0700)
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/merge-tree.c
index bad6735c76fd0647547edfd1201d91c3c86dfc8f..f12da292cf91b1ecb9fc785fd50bd1ef83b361e9 100644 (file)
@@ -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)
 {
 
 static void *get_tree_descriptor(struct tree_desc *desc, const char *rev)
 {
-       unsigned char sha1[20];
+       struct object_id oid;
        void *buf;
 
        void *buf;
 
-       if (get_sha1(rev, sha1))
+       if (get_oid(rev, &oid))
                die("unknown rev %s", rev);
                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;
        if (!buf)
                die("%s is not a tree", rev);
        return buf;