projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
builtin-grep: terminate correctly at EOF
[git.git]
/
builtin-grep.c
diff --git
a/builtin-grep.c
b/builtin-grep.c
index
2124fa6
..
e87b5cb
100644
(file)
--- a/
builtin-grep.c
+++ b/
builtin-grep.c
@@
-264,6
+264,8
@@
static int grep_buffer(struct grep_opt *opt, const char *name,
}
*eol = ch;
bol = eol + 1;
+ if (!left)
+ break;
left--;
lno++;
}