• J
    send-pack: tighten remote error reporting · 2a0fe89a
    Jeff King 提交于
    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: NJeff King <peff@peff.net>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    2a0fe89a
builtin-send-pack.c 14.3 KB