summaryrefslogtreecommitdiff
path: root/mktag.c
diff options
context:
space:
mode:
Diffstat (limited to 'mktag.c')
-rw-r--r--mktag.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/mktag.c b/mktag.c
index a609e3e..a3b4270 100644
--- a/mktag.c
+++ b/mktag.c
@@ -19,16 +19,17 @@
/*
* We refuse to tag something we can't verify. Just because.
*/
-static int verify_object(unsigned char *sha1, const char *expected_type)
+static int verify_object(const unsigned char *sha1, const char *expected_type)
{
int ret = -1;
enum object_type type;
unsigned long size;
- void *buffer = read_sha1_file(sha1, &type, &size);
+ const unsigned char *repl;
+ void *buffer = read_sha1_file_repl(sha1, &type, &size, &repl);
if (buffer) {
if (type == type_from_string(expected_type))
- ret = check_sha1_signature(sha1, buffer, size, expected_type);
+ ret = check_sha1_signature(repl, buffer, size, expected_type);
free(buffer);
}
return ret;