Merge branch 'lv/tls-1.3'
[gitweb.git] / builtin / mktag.c
index 810b24bef38b434c59718a6ac2883b7cfaafcd21..9f5a50a8fd5b0b3acf664df8d20ae5bdee288fe8 100644 (file)
@@ -23,15 +23,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(oid);
 
        if (buffer) {
-               struct object_id reploid;
-               hashcpy(reploid.hash, repl);
-
                if (type == type_from_string(expected_type))
-                       ret = check_object_signature(&reploid, buffer, size, expected_type);
+                       ret = check_object_signature(repl, buffer, size, expected_type);
                free(buffer);
        }
        return ret;