t5533: test "push --force-with-lease"
[gitweb.git] / transport-helper.c
index 06c08a1786391e7a04fa566af0cf42c659ed8aa9..95d22f8d96d556a40639da2a38043b1d1b5bf380 100644 (file)
@@ -56,7 +56,7 @@ static int recvline_fh(FILE *helper, struct strbuf *buffer, const char *name)
        if (strbuf_getline(buffer, helper, '\n') == EOF) {
                if (debug)
                        fprintf(stderr, "Debug: Remote helper quit.\n");
-               die("Reading from helper 'git-remote-%s' failed", name);
+               exit(128);
        }
 
        if (debug)
@@ -683,6 +683,11 @@ static int push_update_ref_status(struct strbuf *buf,
                        free(msg);
                        msg = NULL;
                }
+               else if (!strcmp(msg, "stale info")) {
+                       status = REF_STATUS_REJECT_STALE;
+                       free(msg);
+                       msg = NULL;
+               }
        }
 
        if (*ref)
@@ -756,6 +761,7 @@ static int push_refs_with_push(struct transport *transport,
                /* Check for statuses set by set_ref_status_for_push() */
                switch (ref->status) {
                case REF_STATUS_REJECT_NONFASTFORWARD:
+               case REF_STATUS_REJECT_STALE:
                case REF_STATUS_REJECT_ALREADY_EXISTS:
                case REF_STATUS_UPTODATE:
                        continue;