#include "tag.h"
#include "blob.h"
#include "refs.h"
-#include "strbuf.h"
static unsigned char current_commit_sha1[20];
int targets = 0, targets_alloc = 0;
struct strbuf buf;
*target = NULL; *write_ref = NULL;
- strbuf_init(&buf);
+ strbuf_init(&buf, 0);
while (1) {
char *rf_one = NULL;
char *tg_one;
- read_line(&buf, stdin, '\n');
- if (buf.eof)
+ if (strbuf_getline(&buf, stdin, '\n') == EOF)
break;
tg_one = buf.buf;
rf_one = strchr(tg_one, '\t');
(*write_ref)[targets] = rf_one ? xstrdup(rf_one) : NULL;
targets++;
}
+ strbuf_release(&buf);
return targets;
}
for (i = 0; i < targets; i++) {
if (interpret_target(walker, target[i], &sha1[20 * i])) {
- error("Could not interpret %s as something to pull", target[i]);
+ error("Could not interpret response from server '%s' as something to pull", target[i]);
goto unlock_and_fail;
}
if (process(walker, lookup_unknown_object(&sha1[20 * i])))