summaryrefslogtreecommitdiff
path: root/builtin-grep.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2007-03-21 17:07:46 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-03-21 17:21:56 (GMT)
commita8c40471ab0851bf9a58f7dc76f121258e0690e2 (patch)
tree161da4c14a0d4f45cff256ca0df7789a81545e59 /builtin-grep.c
parent171dccd511bb4642e4491dc5115549b67a859a5b (diff)
downloadgit-a8c40471ab0851bf9a58f7dc76f121258e0690e2.zip
git-a8c40471ab0851bf9a58f7dc76f121258e0690e2.tar.gz
git-a8c40471ab0851bf9a58f7dc76f121258e0690e2.tar.bz2
Remove "pathlen" from "struct name_entry"
Since we have the "tree_entry_len()" helper function these days, and don't need to do a full strlen(), there's no point in saving the path length - it's just redundant information. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
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 4510d35..1348cc9 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))
;