Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Jun 27, 2009

  1. trast

    Use die_errno() instead of die() when checking syscalls

    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: Thomas Rast <trast@student.ethz.ch>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored gitster committed
  2. trast

    Convert existing die(..., strerror(errno)) to die_errno()

    Change calls to die(..., strerror(errno)) to use the new die_errno().
    
    In the process, also make slight style adjustments: at least state
    _something_ about the function that failed (instead of just printing
    the pathname), and put paths in single quotes.
    
    Signed-off-by: Thomas Rast <trast@student.ethz.ch>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored gitster committed
Something went wrong with that request. Please try again.