send-email: simplify Gmail example in the documentation
[gitweb.git] / builtin / grep.c
index 111b6f6cf1a61b0fb481101fcdc5a9f3f48c4650..462e60790165a333d58d81ec65ae4ae6da8d4f79 100644 (file)
@@ -438,7 +438,7 @@ static int grep_tree(struct grep_opt *opt, const struct pathspec *pathspec,
                strbuf_add(base, entry.path, te_len);
 
                if (S_ISREG(entry.mode)) {
-                       hit |= grep_sha1(opt, entry.sha1, base->buf, tn_len,
+                       hit |= grep_sha1(opt, entry.oid->hash, base->buf, tn_len,
                                         check_attr ? base->buf + tn_len : NULL);
                }
                else if (S_ISDIR(entry.mode)) {
@@ -447,10 +447,10 @@ static int grep_tree(struct grep_opt *opt, const struct pathspec *pathspec,
                        void *data;
                        unsigned long size;
 
-                       data = lock_and_read_sha1_file(entry.sha1, &type, &size);
+                       data = lock_and_read_sha1_file(entry.oid->hash, &type, &size);
                        if (!data)
                                die(_("unable to read tree (%s)"),
-                                   sha1_to_hex(entry.sha1));
+                                   oid_to_hex(entry.oid));
 
                        strbuf_addch(base, '/');
                        init_tree_desc(&sub, data, size);