diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2015-11-10 02:22:28 +0000 |
---|---|---|
committer | Jeff King <peff@peff.net> | 2015-11-20 08:02:05 -0500 |
commit | f2fd0760f62e79609fef7bfd7ecebb002e8e4ced (patch) | |
tree | 1f915114b015428730e95a89697783560b672008 /fsck.c | |
parent | 7999b2cf772956466baa8925491d6fb1b0963292 (diff) | |
download | git-f2fd0760f62e79609fef7bfd7ecebb002e8e4ced.tar.gz |
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.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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; } |