Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Jul 28, 2010
  1. @trast @gitster

    xsize_t: check whether we lose bits

    trast authored gitster committed
    Attempting to mmap (via git-add or similar) a file larger than 4GB on
    32-bit Linux systems results in a repository that has only the file
    modulo 4GB stored, because of truncation of the off_t file size to a
    size_t for mmap.
    When xsize_t was introduced to handle this truncation in dc49cd7 (Cast
    64 bit off_t to 32 bit size_t, 2007-03-06), Shawn even pointed out
    that it should detect when such a cutoff happens.
    Make it so.
    Signed-off-by: Thomas Rast <>
    Signed-off-by: Junio C Hamano <>
Commits on Jun 27, 2009
  1. @trast @gitster

    Introduce die_errno() that appends strerror(errno) to die()

    trast authored gitster committed
    There are many calls to die() that do, or should, report
    strerror(errno) to indicate how the syscall they guard failed.
    Introduce a small helper function for this case.
    - POSIX says vsnprintf can modify errno in some unlikely cases, so we
      have to use errno early.
    - We take some care to pass the original format to die_routine(), in
      case someone wants to call die_errno() with custom format
    Signed-off-by: Thomas Rast <>
    Signed-off-by: Junio C Hamano <>
Something went wrong with that request. Please try again.