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>
This commit is contained in:

committed by
Junio C Hamano

parent
84571760ca
commit
aca6065c88
@ -738,12 +738,12 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)
|
|||||||
heads = 0;
|
heads = 0;
|
||||||
for (i = 0; i < argc; i++) {
|
for (i = 0; i < argc; i++) {
|
||||||
const char *arg = argv[i];
|
const char *arg = argv[i];
|
||||||
unsigned char sha1[20];
|
struct object_id oid;
|
||||||
if (!get_sha1(arg, sha1)) {
|
if (!get_oid(arg, &oid)) {
|
||||||
struct object *obj = lookup_object(sha1);
|
struct object *obj = lookup_object(oid.hash);
|
||||||
|
|
||||||
if (!obj || !(obj->flags & HAS_OBJ)) {
|
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;
|
errors_found |= ERROR_OBJECT;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user