Convert struct object to object_id
[gitweb.git] / builtin / grep.c
index 9c42fc03b9c9db8ccf5f577ae06c88bde55f9171..ca3ceea42c2457413f14b645af842d220c516df9 100644 (file)
@@ -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);