Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Aug 27, 2009
  1. @drafnel @gitster

    abspath.c: move declaration of 'len' into inner block and use appropr…

    drafnel authored gitster committed
    …iate type
    The 'len' variable was declared at the beginning of the make_absolute_path
    function and also in an inner 'if' block which masked the outer declaration.
    It is only used in two 'if' blocks, so remove the outer declaration and
    make a new declaration inside the other 'if' block that uses 'len'.
    Signed-off-by: Brandon Casey <>
    Signed-off-by: Junio C Hamano <>
Commits on Jun 27, 2009
  1. @trast @gitster

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

    trast authored gitster 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: Thomas Rast <>
    Signed-off-by: Junio C Hamano <>
Commits on Dec 17, 2008
  1. @gitster

    make_absolute_path(): check bounds when seeing an overlong symlink

    gitster authored
    Signed-off-by: Junio C Hamano <>
    Acked-by: Linus Torvalds <>
Commits on Sep 9, 2008
  1. @gitster

    is_directory(): a generic helper function

    gitster authored
    A simple "grep -e stat --and -e S_ISDIR" revealed there are many
    open-coded implementations of this function.
    Signed-off-by: Junio C Hamano <>
Commits on Jul 26, 2008
  1. @gitster

    Allow add_path() to add non-existent directories to the path

    Johannes Sixt authored gitster committed
    This function had used make_absolute_path(); but this function dies if
    the directory that contains the entry whose relative path was supplied in
    the argument does not exist. This is a problem if the argument is, for
    example, "../libexec/git-core", and that "../libexec" does not exist.
    Since the resolution of symbolic links is not required for elements in
    PATH, we can fall back to using make_nonrelative_path(), which simply
    prepends $PWD to the path.
    We have to move make_nonrelative_path() alongside make_absolute_path() in
    abspath.c so that git-shell can be linked. See 5b8e6f8.
    Signed-off-by: Johannes Sixt <>
    Signed-off-by: Junio C Hamano <>
Commits on Jun 28, 2008
  1. @dmpot @gitster

    shrink git-shell by avoiding redundant dependencies

    dmpot authored gitster committed
    A lot of modules that have nothing to do with git-shell functionality
    were linked in, bloating git-shell more than 8 times.
    This patch cuts off redundant dependencies by:
    1. providing stubs for three functions that make no sense for git-shell;
    2. moving quote_path_fully from environment.c to quote.c to make the
       later self sufficient;
    3. moving make_absolute_path into a new separate file.
    The following numbers have been received with the default optimization
    settings on master using GCC 4.1.2:
       text    data     bss     dec     hex filename
     143915    1348   93168  238431   3a35f git-shell
       text    data     bss     dec     hex filename
      17670     788    8232   26690    6842 git-shell
    Signed-off-by: Junio C Hamano <>
Something went wrong with that request. Please try again.