diff options
author | Jeff King <peff@peff.net> | 2007-11-18 02:16:52 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-11-18 02:34:52 -0800 |
commit | 2a0fe89a976331cb2163d4f299e38e2cb5010632 (patch) | |
tree | 86c74501756faae2e7ffcfa5f50fe29f609306c2 /cache.h | |
parent | cda69f481db510e2a3f0ca8a0f4b54123c799416 (diff) | |
download | git-2a0fe89a976331cb2163d4f299e38e2cb5010632.tar.gz git-2a0fe89a976331cb2163d4f299e38e2cb5010632.tar.xz |
send-pack: tighten remote error reporting
Previously, we set all ref pushes to 'OK', and then marked
them as errors if the remote reported so. This has the
problem that if the remote dies or fails to report a ref, we
just assume it was OK.
Instead, we use a new non-OK state to indicate that we are
expecting status (if the remote doesn't support the
report-status feature, we fall back on the old behavior).
Thus we can flag refs for which we expected a status, but
got none (conversely, we now also print a warning for refs
for which we get a status, but weren't expecting one).
This also allows us to simplify the receive_status exit
code, since each ref is individually marked with failure
until we get a success response. We can just print the usual
status table, so the user still gets a sense of what we were
trying to do when the failure happened.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -504,8 +504,9 @@ struct ref { REF_STATUS_REJECT_NODELETE, REF_STATUS_UPTODATE, REF_STATUS_REMOTE_REJECT, + REF_STATUS_EXPECTING_REPORT, } status; - char *error; + char *remote_status; struct ref *peer_ref; /* when renaming */ char name[FLEX_ARRAY]; /* more */ }; |