Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
rev-parse --branches/--tags/--remotes=pattern
[gitweb.git]
/
builtin-grep.c
diff --git
a/builtin-grep.c
b/builtin-grep.c
index 529461fb8fdf6bdbee86b8cc46fa610696cb9382..cea973ba6bafff69b72db0923e5b583dc0a3f8bc 100644
(file)
--- a/
builtin-grep.c
+++ b/
builtin-grep.c
@@
-205,6
+205,7
@@
static int grep_file(struct grep_opt *opt, const char *filename)
return 0;
}
close(i);
+ data[sz] = 0;
if (opt->relative && opt->prefix_length)
filename = quote_path_relative(filename, -1, &buf, opt->prefix);
i = grep_buffer(opt, filename, data, sz);