From: brian m. carlson Date: Thu, 13 Jul 2017 23:49:18 +0000 (+0000) Subject: builtin/fsck: convert remaining caller of get_sha1 to object_id X-Git-Tag: v2.15.0-rc0~213^2~11 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/aca6065c88617918c64c7f91388dae4d7fe49a5a builtin/fsck: convert remaining caller of get_sha1 to object_id Signed-off-by: brian m. carlson Signed-off-by: Junio C Hamano --- diff --git a/builtin/fsck.c b/builtin/fsck.c index 99dea7adf6..0e5a18e843 100644 --- a/builtin/fsck.c +++ b/builtin/fsck.c @@ -738,12 +738,12 @@ int cmd_fsck(int argc, const char **argv, const char *prefix) heads = 0; for (i = 0; i < argc; i++) { const char *arg = argv[i]; - unsigned char sha1[20]; - if (!get_sha1(arg, sha1)) { - struct object *obj = lookup_object(sha1); + struct object_id oid; + if (!get_oid(arg, &oid)) { + struct object *obj = lookup_object(oid.hash); if (!obj || !(obj->flags & HAS_OBJ)) { - error("%s: object missing", sha1_to_hex(sha1)); + error("%s: object missing", oid_to_hex(&oid)); errors_found |= ERROR_OBJECT; continue; }