aboutsummaryrefslogtreecommitdiff
path: root/remote-curl.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-01-29 13:18:54 -0800
committerJunio C Hamano <gitster@pobox.com>2012-01-29 13:18:54 -0800
commit2bbf77dde2b47f2b8c9769c4d64f7f2f591d1e99 (patch)
treeb329ea0a49dac95102679bdceb8cd2a1f58ca5ca /remote-curl.c
parent731218c18f493cc6c6e3fc22be837e49e5399768 (diff)
parent5238cbf65638d7a097bdb5ca8226f5acbe31f143 (diff)
downloadgit-2bbf77dde2b47f2b8c9769c4d64f7f2f591d1e99.tar.gz
git-2bbf77dde2b47f2b8c9769c4d64f7f2f591d1e99.tar.xz
Merge branch 'sp/smart-http-failure-to-push'
* sp/smart-http-failure-to-push: remote-curl: Fix push status report when all branches fail
Diffstat (limited to 'remote-curl.c')
-rw-r--r--remote-curl.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/remote-curl.c b/remote-curl.c
index bcbc7fba4..d159fe7f3 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -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]);