summaryrefslogtreecommitdiff
path: root/builtin-grep.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-grep.c')
-rw-r--r--builtin-grep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-grep.c b/builtin-grep.c
index 4510d35324..1348cc92ef 100644
--- a/builtin-grep.c
+++ b/builtin-grep.c
@@ -378,7 +378,7 @@ static int grep_tree(struct grep_opt *opt, const char **paths,
* decide if we want to descend into "abc"
* directory.
*/
- strcpy(path_buf + len + entry.pathlen, "/");
+ strcpy(path_buf + len + tree_entry_len(entry.path, entry.sha1), "/");
if (!pathspec_matches(paths, down))
;