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>
This commit is contained in:
committed by
Jeff King
parent
7999b2cf77
commit
f2fd0760f6
@ -468,12 +468,12 @@ static int grep_object(struct grep_opt *opt, const struct pathspec *pathspec,
|
||||
int hit, len;
|
||||
|
||||
grep_read_lock();
|
||||
data = read_object_with_reference(obj->sha1, tree_type,
|
||||
data = read_object_with_reference(obj->oid.hash, tree_type,
|
||||
&size, NULL);
|
||||
grep_read_unlock();
|
||||
|
||||
if (!data)
|
||||
die(_("unable to read tree (%s)"), sha1_to_hex(obj->sha1));
|
||||
die(_("unable to read tree (%s)"), oid_to_hex(&obj->oid));
|
||||
|
||||
len = name ? strlen(name) : 0;
|
||||
strbuf_init(&base, PATH_MAX + len + 1);
|
||||
|
||||
Reference in New Issue
Block a user