builtin/fsck: convert remaining caller of get_sha1 to object_id
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
brian m. carlson committed
Jul 13, 2017 at 23:49 UTC
aca6065c88617918c64c7f91388dae4d7fe49a5a
1 file changed
+4
-4
builtin/fsck.c
+4
-4
@@ -738,12 +738,12 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)
738
heads = 0;
739
for (i = 0; i < argc; i++) {
740
const char *arg = argv[i];
741
- unsigned char sha1[20];
742
- if (!get_sha1(arg, sha1)) {
743
- struct object *obj = lookup_object(sha1);
741
+ struct object_id oid;
742
+ if (!get_oid(arg, &oid)) {
743
+ struct object *obj = lookup_object(oid.hash);
744
745
if (!obj || !(obj->flags & HAS_OBJ)) {
746
- error("%s: object missing", sha1_to_hex(sha1));
746
+ error("%s: object missing", oid_to_hex(&oid));
747
errors_found |= ERROR_OBJECT;
748
continue;
749
}