diff --git a/builtin-grep.c b/builtin-grep.c
index 9873e3d1dbf0e8735641cc178d687a9d5194487e..2bfbdb71407dcd0ddfe970f6a614158d954cd4c0 100644 (file)
--- a/builtin-grep.c
+++ b/builtin-grep.c
#include "tag.h"
#include "tree-walk.h"
#include "builtin.h"
-#include <regex.h>
#include "grep.h"
-#include <fnmatch.h>
-#include <sys/wait.h>
/*
* git grep pathspecs are somewhat different from diff-tree pathspecs;
if (i < 0)
goto err_ret;
data = xmalloc(st.st_size + 1);
- if (st.st_size != xread(i, data, st.st_size)) {
+ if (st.st_size != read_in_full(i, data, st.st_size)) {
error("'%s': short read %s", filename, strerror(errno));
close(i);
free(data);