aboutsummaryrefslogtreecommitdiffstats
path: root/send-pack.c
diff options
context:
space:
mode:
Diffstat (limited to 'send-pack.c')
-rw-r--r--send-pack.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/send-pack.c b/send-pack.c
index 772c7683a0..4448c081cc 100644
--- a/send-pack.c
+++ b/send-pack.c
@@ -632,7 +632,7 @@ int send_pack(struct repository *r,
reject_atomic_push(remote_refs, args->send_mirror);
error("atomic push failed for ref %s. status: %d",
ref->name, ref->status);
- ret = args->porcelain ? 0 : -1;
+ ret = ERROR_SEND_PACK_BAD_REF_STATUS;
goto out;
}
/* else fallthrough */
@@ -763,11 +763,6 @@ int send_pack(struct repository *r,
if (ret < 0)
goto out;
- if (args->porcelain) {
- ret = 0;
- goto out;
- }
-
for (ref = remote_refs; ref; ref = ref->next) {
switch (ref->status) {
case REF_STATUS_NONE:
@@ -775,7 +770,7 @@ int send_pack(struct repository *r,
case REF_STATUS_OK:
break;
default:
- ret = -1;
+ ret = ERROR_SEND_PACK_BAD_REF_STATUS;
goto out;
}
}