*/
#include "builtin.h"
#include "cache.h"
-#include "strbuf.h"
#include "quote.h"
#include "cache-tree.h"
struct strbuf buf;
if (all)
die("git-checkout-index: don't mix '--all' and '--stdin'");
- strbuf_init(&buf);
+ strbuf_init(&buf, 0);
while (1) {
char *path_name;
const char *p;
-
- read_line(&buf, stdin, line_termination);
- if (buf.eof)
+ if (strbuf_getline(&buf, stdin, line_termination) == EOF)
break;
if (line_termination && buf.buf[0] == '"')
path_name = unquote_c_style(buf.buf, NULL);
if (path_name != buf.buf)
free(path_name);
}
+ strbuf_release(&buf);
}
if (all)