1. 02 9月, 2006 1 次提交
    • S
      Replace uses of strdup with xstrdup. · 9befac47
      Shawn Pearce 提交于
      Like xmalloc and xrealloc xstrdup dies with a useful message if
      the native strdup() implementation returns NULL rather than a
      valid pointer.
      
      I just tried to use xstrdup in new code and found it to be missing.
      However I expected it to be present as xmalloc and xrealloc are
      already commonly used throughout the code.
      
      [jc: removed the part that deals with last_XXX, which I am
       finding more and more dubious these days.]
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      9befac47
  2. 24 8月, 2006 1 次提交
    • S
      Convert memcpy(a,b,20) to hashcpy(a,b). · e702496e
      Shawn Pearce 提交于
      This abstracts away the size of the hash values when copying them
      from memory location to memory location, much as the introduction
      of hashcmp abstracted away hash value comparsion.
      
      A few call sites were using char* rather than unsigned char* so
      I added the cast rather than open hashcpy to be void*.  This is a
      reasonable tradeoff as most call sites already use unsigned char*
      and the existing hashcmp is also declared to be unsigned char*.
      
      [jc: Splitted the patch to "master" part, to be followed by a
       patch for merge-recursive.c which is not in "master" yet.
      
       Fixed the cast in the latter hunk to combine-diff.c which was
       wrong in the original.
      
       Also converted ones left-over in combine-diff.c, diff-lib.c and
       upload-pack.c ]
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      e702496e
  3. 18 8月, 2006 1 次提交
  4. 17 8月, 2006 1 次提交
  5. 16 8月, 2006 2 次提交
  6. 15 8月, 2006 1 次提交
  7. 11 8月, 2006 1 次提交
  8. 10 8月, 2006 2 次提交
  9. 04 8月, 2006 1 次提交
    • J
      diff.c: do not use pathname comparison to tell renames · ef677686
      Junio C Hamano 提交于
      The final output from diff used to compare pathnames between
      preimage and postimage to tell if the filepair is a rename/copy.
      By explicitly marking the filepair created by diffcore_rename(),
      the output routine, resolve_rename_copy(), does not have to do
      so anymore.  This helps feeding a filepair that has different
      pathnames in one and two elements to the diff machinery (most
      notably, comparing two blobs).
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      ef677686
  10. 01 8月, 2006 1 次提交
  11. 24 7月, 2006 1 次提交
    • J
      Colorize 'commit' lines in log ui · ce436973
      Jeff King 提交于
      When paging through the output of git-whatchanged, the color cues help to
      visually navigate within a diff. However, it is difficult to notice when a
      new commit starts, because the commit and log are shown in the "normal"
      color. This patch colorizes the 'commit' line, customizable through
      diff.colors.commit and defaulting to yellow.
      
      As a side effect, some of the diff color engine (slot enum, get_color) has
      become accessible outside of diff.c.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      ce436973
  12. 14 7月, 2006 2 次提交
  13. 10 7月, 2006 1 次提交
    • S
      Avoid C99 initializers · 344c52ae
      Shawn Pearce 提交于
      In a handful places, we use C99 structure and array
      initializers, which some compilers do not support.
      
      This can be handy when you are trying to compile GIT on a
      Solaris system that has an older C compiler, for example.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      344c52ae
  14. 09 7月, 2006 1 次提交
    • J
      "git -p cmd" to page anywhere · 85fb65ed
      Junio C Hamano 提交于
      This allows you to say:
      
      	git -p diff v2.6.16-rc5..
      
      and the command pipes the output of any git command to your pager.
      
      [jc: this resurrects a month old RFC patch with improvement
       suggested by Linus to call it --paginate instead of --less.]
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      85fb65ed
  15. 08 7月, 2006 6 次提交
  16. 07 7月, 2006 1 次提交
  17. 04 7月, 2006 1 次提交
    • J
      Make zlib compression level configurable, and change default. · 12f6c308
      Joachim B Haga 提交于
      With the change in default, "git add ." on kernel dir is about
      twice as fast as before, with only minimal (0.5%) change in
      object size. The speed difference is even more noticeable
      when committing large files, which is now up to 8 times faster.
      
      The configurability is through setting core.compression = [-1..9]
      which maps to the zlib constants; -1 is the default, 0 is no
      compression, and 1..9 are various speed/size tradeoffs, 9
      being slowest.
      
      Signed-off-by: Joachim B Haga (cjhaga@fys.uio.no)
      Acked-by: NLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      12f6c308
  18. 02 7月, 2006 1 次提交
  19. 29 6月, 2006 1 次提交
  20. 28 6月, 2006 3 次提交
  21. 27 6月, 2006 6 次提交
  22. 25 6月, 2006 2 次提交
    • J
      diff --color: use $GIT_DIR/config · 801235c5
      Junio C Hamano 提交于
      This lets you use something like this in your $GIT_DIR/config
      file.
      
      	[diff]
      		color = auto
      
      	[diff.color]
      		new = blue
      		old = yellow
      		frag = reverse
      
      When diff.color is set to "auto", colored diff is enabled when
      the standard output is the terminal.  Other choices are "always",
      and "never".  Usual boolean true/false can also be used.
      
      The colormap entries can specify colors for the following slots:
      
      	plain	- lines that appear in both old and new file (context)
      	meta	- diff --git header and extended git diff headers
      	frag	- @@ -n,m +l,k @@ lines (hunk header)
      	old	- lines deleted from old file
      	new	- lines added to new file
      
      The following color names can be used:
      
      	normal, bold, dim, l, blink, reverse, reset,
      	black, red, green, yellow, blue, magenta, cyan,
      	white
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      801235c5
    • T
      Clean up diff.c · d2543b8e
      Timo Hirvonen 提交于
      Signed-off-by: NTimo Hirvonen <tihirvon@gmail.com>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      d2543b8e
  23. 24 6月, 2006 2 次提交