summaryrefslogtreecommitdiff
path: root/remote-curl.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-02-05 23:58:43 -0800
committerJunio C Hamano <gitster@pobox.com>2012-02-05 23:58:43 -0800
commitf2120eb4db3e3e3f9a336eb04fdc2319d7421536 (patch)
treeda17eb49578d0413168d71931a840084ea6f6657 /remote-curl.c
parente27d620e919f524ee0bfa0a4d1f35225d3cb867e (diff)
parent5238cbf65638d7a097bdb5ca8226f5acbe31f143 (diff)
downloadgit-f2120eb4db3e3e3f9a336eb04fdc2319d7421536.tar.gz
Merge branch 'sp/smart-http-failure-to-push' into maint
* 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 bcbc7fba4e..d159fe7f34 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]);