summaryrefslogtreecommitdiff
path: root/transport.c
diff options
context:
space:
mode:
Diffstat (limited to 'transport.c')
-rw-r--r--transport.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/transport.c b/transport.c
index ffe2115845..47da955e4f 100644
--- a/transport.c
+++ b/transport.c
@@ -633,6 +633,11 @@ static int print_one_push_report(struct ref *ref, const char *dest, int count,
"stale info",
report, porcelain, summary_width);
break;
+ case REF_STATUS_REJECT_REMOTE_UPDATED:
+ print_ref_status('!', "[rejected]", ref, ref->peer_ref,
+ "remote ref updated since checkout",
+ report, porcelain, summary_width);
+ break;
case REF_STATUS_REJECT_SHALLOW:
print_ref_status('!', "[rejected]", ref, ref->peer_ref,
"new shallow roots not allowed",
@@ -743,6 +748,8 @@ void transport_print_push_status(const char *dest, struct ref *refs,
*reject_reasons |= REJECT_FETCH_FIRST;
} else if (ref->status == REF_STATUS_REJECT_NEEDS_FORCE) {
*reject_reasons |= REJECT_NEEDS_FORCE;
+ } else if (ref->status == REF_STATUS_REJECT_REMOTE_UPDATED) {
+ *reject_reasons |= REJECT_REF_NEEDS_UPDATE;
}
}
free(head);
@@ -1185,6 +1192,7 @@ static int run_pre_push_hook(struct transport *transport,
if (!r->peer_ref) continue;
if (r->status == REF_STATUS_REJECT_NONFASTFORWARD) continue;
if (r->status == REF_STATUS_REJECT_STALE) continue;
+ if (r->status == REF_STATUS_REJECT_REMOTE_UPDATED) continue;
if (r->status == REF_STATUS_UPTODATE) continue;
strbuf_reset(&buf);