diff options
| author | brian m. carlson <sandals@crustytoothpaste.net> | 2016-04-17 23:10:39 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2016-04-25 14:23:42 -0700 |
| commit | 7d924c9139e33e7599d7aed0446e634c427a5f15 (patch) | |
| tree | 61d1667fff3d183398d5223d86805ec44264a518 /builtin/grep.c | |
| parent | 82db3d44e7a9d9219dd8e19607026bae9e435012 (diff) | |
| download | git-7d924c9139e33e7599d7aed0446e634c427a5f15.tar.gz | |
struct name_entry: use struct object_id instead of unsigned char sha1[20]
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/grep.c')
| -rw-r--r-- | builtin/grep.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/grep.c b/builtin/grep.c index aa7435f380..b15020067b 100644 --- a/builtin/grep.c +++ b/builtin/grep.c @@ -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); |
