]> git.ipfire.org Git - thirdparty/git.git/blobdiff - transport.c
Merge branch 'pb/ref-filter-with-crlf'
[thirdparty/git.git] / transport.c
index ffe21158455116972dd8b0cf77167948fb6e66e6..47da955e4fe4548199c28365d3f894bd0b1a81b7 100644 (file)
@@ -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);