diff options
Diffstat (limited to 'builtin/fetch-pack.c')
-rw-r--r-- | builtin/fetch-pack.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c index f73664f433..c21cc2c778 100644 --- a/builtin/fetch-pack.c +++ b/builtin/fetch-pack.c @@ -100,12 +100,11 @@ int cmd_fetch_pack(int argc, const char **argv, const char *prefix) /* in stateless RPC mode we use pkt-line to read * from stdin, until we get a flush packet */ - static char line[1000]; for (;;) { - int n = packet_read_line(0, line, sizeof(line)); - if (!n) + char *line = packet_read_line(0, NULL); + if (!line) break; - string_list_append(&sought, xmemdupz(line, n)); + string_list_append(&sought, xstrdup(line)); } } else { |