Skip to content
  • Thomas Rast's avatar
    Use die_errno() instead of die() when checking syscalls · 0721c314
    Thomas Rast authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    Lots of die() calls did not actually report the kind of error, which
    can leave the user confused as to the real problem.  Use die_errno()
    where we check a system/library call that sets errno on failure, or
    one of the following that wrap such calls:
    
      Function              Passes on error from
      --------              --------------------
      odb_pack_keep         open
      read_ancestry         fopen
      read_in_full          xread
      strbuf_read           xread
      strbuf_read_file      open or strbuf_read_file
      strbuf_readlink       readlink
      write_in_full         xwrite
    
    Signed-off-by: default avatarThomas Rast <trast@student.ethz.ch>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    0721c314