sequencer: introduce todo_list_write_to_file()
[gitweb.git] / builtin / mktag.c
index 65bb41e3cdd534c3dd48f772511f7ebd8c225813..6fb7dc8578d68526c64179d7fc43aaa5a72445f6 100644 (file)
@@ -1,5 +1,7 @@
 #include "builtin.h"
 #include "tag.h"
+#include "replace-object.h"
+#include "object-store.h"
 
 /*
  * A signature file has a very simple fixed format: four lines
@@ -23,12 +25,12 @@ static int verify_object(const struct object_id *oid, const char *expected_type)
        int ret = -1;
        enum object_type type;
        unsigned long size;
-       void *buffer = read_sha1_file(oid->hash, &type, &size);
-       const unsigned char *repl = lookup_replace_object(oid->hash);
+       void *buffer = read_object_file(oid, &type, &size);
+       const struct object_id *repl = lookup_replace_object(the_repository, oid);
 
        if (buffer) {
                if (type == type_from_string(expected_type))
-                       ret = check_sha1_signature(repl, buffer, size, expected_type);
+                       ret = check_object_signature(repl, buffer, size, expected_type);
                free(buffer);
        }
        return ret;