Skip to content
  • Jeff King's avatar
    write_or_die: drop write_or_whine_pipe() · ca5c701c
    Jeff King authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    This function has no callers, and is not likely to gain any
    because it's confusing to use.
    
    It unconditionally complains to stderr, but _doesn't_ die.
    Yet any caller which wants a "gentle" write would generally
    want to suppress the error message, because presumably
    they're going to write a better one, and/or try the
    operation again.
    
    And the check_pipe() call leads to confusing behaviors. It
    means we die for EPIPE, but not for other errors, which is
    confusing and pointless.
    
    On top of all that, it has unusual error return semantics,
    which makes it easy for callers to get it wrong.
    
    Let's drop the function, and if somebody ever needs to
    resurrect something like it, they can fix these warts.
    
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    ca5c701c