summaryrefslogtreecommitdiff
path: root/fsck.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2015-11-10 02:22:28 (GMT)
committerJeff King <peff@peff.net>2015-11-20 13:02:05 (GMT)
commitf2fd0760f62e79609fef7bfd7ecebb002e8e4ced (patch)
tree1f915114b015428730e95a89697783560b672008 /fsck.c
parent7999b2cf772956466baa8925491d6fb1b0963292 (diff)
downloadgit-f2fd0760f62e79609fef7bfd7ecebb002e8e4ced.zip
git-f2fd0760f62e79609fef7bfd7ecebb002e8e4ced.tar.gz
git-f2fd0760f62e79609fef7bfd7ecebb002e8e4ced.tar.bz2
Convert struct object to object_id
struct object is one of the major data structures dealing with object IDs. Convert it to use struct object_id instead of an unsigned char array. Convert get_object_hash to refer to the new member as well. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 'fsck.c')
-rw-r--r--fsck.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fsck.c b/fsck.c
index baa7f29..f7d65a2 100644
--- a/fsck.c
+++ b/fsck.c
@@ -316,7 +316,7 @@ static int fsck_walk_tree(struct tree *tree, void *data, struct fsck_options *op
result = options->walk(&lookup_blob(entry.sha1)->object, OBJ_BLOB, data, options);
else {
result = error("in tree %s: entry %s has bad mode %.6o",
- sha1_to_hex(tree->object.sha1), entry.path, entry.mode);
+ oid_to_hex(&tree->object.oid), entry.path, entry.mode);
}
if (result < 0)
return result;
@@ -373,7 +373,7 @@ int fsck_walk(struct object *obj, void *data, struct fsck_options *options)
case OBJ_TAG:
return fsck_walk_tag((struct tag *)obj, data, options);
default:
- error("Unknown object type for %s", sha1_to_hex(obj->sha1));
+ error("Unknown object type for %s", oid_to_hex(&obj->oid));
return -1;
}
}
@@ -809,9 +809,9 @@ int fsck_object(struct object *obj, void *data, unsigned long size,
int fsck_error_function(struct object *obj, int msg_type, const char *message)
{
if (msg_type == FSCK_WARN) {
- warning("object %s: %s", sha1_to_hex(obj->sha1), message);
+ warning("object %s: %s", oid_to_hex(&obj->oid), message);
return 0;
}
- error("object %s: %s", sha1_to_hex(obj->sha1), message);
+ error("object %s: %s", oid_to_hex(&obj->oid), message);
return 1;
}