Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Dec 20, 2006
  1. simplify inclusion of system header files.

    Junio C Hamano committed
    This is a mechanical clean-up of the way *.c files include
    system header files.
     (1) sources under compat/, platform sha-1 implementations, and
         xdelta code are exempt from the following rules;
     (2) the first #include must be "git-compat-util.h" or one of
         our own header file that includes it first (e.g. config.h,
         builtin.h, pkt-line.h);
     (3) system headers that are included in "git-compat-util.h"
         need not be included in individual C source files.
     (4) "git-compat-util.h" does not have to include subsystem
         specific header files (e.g. expat.h).
    Signed-off-by: Junio C Hamano <>
Commits on May 20, 2005
  1. sparse cleanup

    Linus Torvalds committed
    Fix various things that sparse complains about:
     - use NULL instead of 0
     - make sure we declare everything properly, or mark it static
     - use proper function declarations ("fn(void)" instead of "fn()")
    Sparse is always right.
Commits on May 19, 2005
  1. [PATCH] fix strbuf take #2

    Junio C Hamano committed with Linus Torvalds
    I just remembered why I placed that bogus "sb->len ==0 implies
    sb->eof" condition there.  We need at least something like this
    to catch the normal EOF (that is, line termination immediately
    followed by EOF) case.  "if (feof(fp))" fires when we have
    already read the eof, not when we are about read it.
    Signed-off-by: Junio C Hamano <>
    Signed-off-by: Linus Torvalds <>
Commits on May 18, 2005
  1. strbuf: allow zero-length lines

    Linus Torvalds committed
    They aren't EOF.
Commits on Apr 26, 2005
  1. [PATCH] introduce xmalloc and xrealloc

    Christopher Li committed with Linus Torvalds
    Introduce xmalloc and xrealloc to die gracefully with a descriptive
    message when out of memory, rather than taking a SIGSEGV. 
    Signed-off-by: Christopher Li<>
    Signed-off-by: Linus Torvalds <>
  2. [PATCH] Introduce diff-tree-helper.

    Junio C Hamano committed with Linus Torvalds
    This patch introduces a new program, diff-tree-helper.  It reads
    output from diff-cache and diff-tree, and produces a patch file.
    The diff format customization can be done the same way the
    show-diff uses; the same external diff interface introduced by
    the previous patch to drive diff from show-diff is used so this
    is not surprising.
    It is used like the following examples:
       $ diff-cache --cached -z <tree> | diff-tree-helper -z -R paths...
       $ diff-tree -r -z <tree1> <tree2> | diff-tree-helper -z paths...
     - As usual, the use of the -z flag is recommended in the script
       to pass NUL-terminated filenames through the pipe between
     - The -R flag is used to generate reverse diff.  It does not
       matter for diff-tree case, but it is sometimes useful to get
       a patch in the desired direction out of diff-cache.
     - The paths parameters are used to restrict the paths that
       appears in the output.  Again this is useful to use with
       diff-cache, which, unlike diff-tree, does not take such paths
       restriction parameters.
    Signed-off-by: Junio C Hamano <>
    Signed-off-by: Linus Torvalds <>
Something went wrong with that request. Please try again.