summaryrefslogtreecommitdiff
path: root/transport.c
diff options
context:
space:
mode:
Diffstat (limited to 'transport.c')
-rw-r--r--transport.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/transport.c b/transport.c
index f1fcd2c4b0..453de8f704 100644
--- a/transport.c
+++ b/transport.c
@@ -1226,6 +1226,20 @@ int transport_push(struct repository *r,
err = push_had_errors(remote_refs);
ret = push_ret | err;
+ if ((flags & TRANSPORT_PUSH_ATOMIC) && err) {
+ struct ref *it;
+ for (it = remote_refs; it; it = it->next)
+ switch (it->status) {
+ case REF_STATUS_NONE:
+ case REF_STATUS_UPTODATE:
+ case REF_STATUS_OK:
+ it->status = REF_STATUS_ATOMIC_PUSH_FAILED;
+ break;
+ default:
+ break;
+ }
+ }
+
if (!quiet || err)
transport_print_push_status(transport->url, remote_refs,
verbose | porcelain, porcelain,