Instead of exiting directly, make it the duty of the caller to do so.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Felipe Contreras11 years agocommitted byJunio C Hamano
if (strbuf_getline(buffer, helper, '\n') == EOF) {
if (debug)
fprintf(stderr, "Debug: Remote helper quit.\n");
exit(128);
return 1;
}
if (debug)
@ -157,7 +157,8 @@ static struct child_process *get_helper(struct transport *transport)
@@ -157,7 +157,8 @@ static struct child_process *get_helper(struct transport *transport)
while (1) {
const char *capname;
int mandatory = 0;
recvline(data, &buf);
if (recvline(data, &buf))
exit(128);
if (!*buf.buf)
break;
@ -302,7 +303,8 @@ static int set_helper_option(struct transport *transport,
@@ -302,7 +303,8 @@ static int set_helper_option(struct transport *transport,
strbuf_addch(&buf, '\n');
sendline(data, &buf);
recvline(data, &buf);
if (recvline(data, &buf))
exit(128);
if (!strcmp(buf.buf, "ok"))
ret = 0;
@ -374,7 +376,8 @@ static int fetch_with_fetch(struct transport *transport,
@@ -374,7 +376,8 @@ static int fetch_with_fetch(struct transport *transport,
sendline(data, &buf);
while (1) {
recvline(data, &buf);
if (recvline(data, &buf))
exit(128);
if (starts_with(buf.buf, "lock ")) {
const char *name = buf.buf + 5;
@ -558,7 +561,9 @@ static int process_connect_service(struct transport *transport,
@@ -558,7 +561,9 @@ static int process_connect_service(struct transport *transport,