summaryrefslogtreecommitdiff
path: root/xdiff-interface.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2016-09-05 20:08:02 +0000
committerJunio C Hamano <gitster@pobox.com>2016-09-07 12:59:42 -0700
commitd449347d080cd97a9d6dc029014383d4817e34bf (patch)
treed64c39be3f1cd8f5833ac1a9dde0664de686a0bf /xdiff-interface.c
parente910bb1e79d53d43d07013b4d7e58c9f3ec53c8d (diff)
downloadgit-d449347d080cd97a9d6dc029014383d4817e34bf.tar.gz
Convert read_mmblob to take struct object_id.
Since all of its callers have been updated, convert read_mmblob to take a pointer to struct object_id. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'xdiff-interface.c')
-rw-r--r--xdiff-interface.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/xdiff-interface.c b/xdiff-interface.c
index f34ea762e4..3bfc69cade 100644
--- a/xdiff-interface.c
+++ b/xdiff-interface.c
@@ -178,20 +178,20 @@ int read_mmfile(mmfile_t *ptr, const char *filename)
return 0;
}
-void read_mmblob(mmfile_t *ptr, const unsigned char *sha1)
+void read_mmblob(mmfile_t *ptr, const struct object_id *oid)
{
unsigned long size;
enum object_type type;
- if (!hashcmp(sha1, null_sha1)) {
+ if (!oidcmp(oid, &null_oid)) {
ptr->ptr = xstrdup("");
ptr->size = 0;
return;
}
- ptr->ptr = read_sha1_file(sha1, &type, &size);
+ ptr->ptr = read_sha1_file(oid->hash, &type, &size);
if (!ptr->ptr || type != OBJ_BLOB)
- die("unable to read blob object %s", sha1_to_hex(sha1));
+ die("unable to read blob object %s", oid_to_hex(oid));
ptr->size = size;
}