Merge branch 'sp/smart-http-failure-to-push'

* sp/smart-http-failure-to-push:
  remote-curl: Fix push status report when all branches fail
This commit is contained in:
Junio C Hamano
2012-01-29 13:18:54 -08:00
2 changed files with 33 additions and 4 deletions

View File

@ -807,7 +807,7 @@ static int push(int nr_spec, char **specs)
static void parse_push(struct strbuf *buf)
{
char **specs = NULL;
int alloc_spec = 0, nr_spec = 0, i;
int alloc_spec = 0, nr_spec = 0, i, ret;
do {
if (!prefixcmp(buf->buf, "push ")) {
@ -824,12 +824,13 @@ static void parse_push(struct strbuf *buf)
break;
} while (1);
if (push(nr_spec, specs))
exit(128); /* error already reported */
ret = push(nr_spec, specs);
printf("\n");
fflush(stdout);
if (ret)
exit(128); /* error already reported */
free_specs:
for (i = 0; i < nr_spec; i++)
free(specs[i]);