1. 17 1月, 2008 1 次提交
    • D
      treat any file with NUL as binary · 28624193
      Dmitry Potapov 提交于
      There are two heuristics in Git to detect whether a file is binary
      or text. One in xdiff-interface.c (which is taken from GNU diff)
      relies on existence of the NUL byte at the beginning. However,
      convert.c used a different heuristic, which relied on the percent
      of non-printable symbols (less than 1% for text files).
      
      Due to differences in detection whether a file is binary or not,
      it was possible that a file that diff treats as binary could be
      treated as text by CRLF conversion. This is very confusing for a
      user who sees that 'git diff' shows the file as binary expects it
      to be added as binary.
      
      This patch makes is_binary to consider any file that contains at
      least one NUL character as binary, to ensure that the heuristics
      used for CRLF conversion is tighter than what is used by diff.
      Signed-off-by: NDmitry Potapov <dpotapov@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      28624193
  2. 16 1月, 2008 3 次提交
  3. 15 1月, 2008 5 次提交
  4. 14 1月, 2008 3 次提交
  5. 13 1月, 2008 3 次提交
    • L
      Fix performance regression for partial commits · fa9dcf80
      Linus Torvalds 提交于
      When running "git commit paths" to create a partial commit, we
      used to carefully build the temporary index so that we do not
      lose the cached stat information.  The rewrite of the command in
      C lost it by carelessly using read_tree().
      
      This resurrects the earlier behaviour to keep the cached stat
      information as much as possible by using one-tree merge logic.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      fa9dcf80
    • J
      git-clean: fix off-by-one memory access when given no arguments · a8db80c2
      Jeff King 提交于
      The "seen" variable is used by match_pathspec, and must have
      as many elements as there are in the given pathspec. We
      create the pathspec either from the command line arguments
      _or_ from just the current prefix.
      
      Thus allocating "seen" based upon just argc is wrong, since
      if argc == 0, then we still have one pathspec, the prefix,
      but we don't allocate any space in "seen".
      Signed-off-by: NJeff King <peff@peff.net>
      Tested-by: Nİsmail Dönmez <ismail@pardus.org.tr>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      a8db80c2
    • E
      git-svn: handle leading/trailing whitespace from svnsync revprops · 98fa5b68
      Eric Wong 提交于
      Repositories generated by svnsync cannot be relied on to have
      properly set revprops without newlines in UUIDs and URLs.  There
      may be broken versions of svnsync out there that append extra
      newlines to UUIDs, or the revprops could've been changed by
      repository administrators at any time, too.
      
      At least one repository we've come across has an embedded
      newline erroneously set in the svnsync-uuid prop.  This is bad
      because the trailing newline is taken as another record by the
      Git.pm library, and the wantarray detection causes tmp_config()
      to return an array with an empty-but-existing second element.
      
      We will now strip leading and trailing whitespace both before
      setting and after reading the uuid and url for svnsync values.
      We will also force tmp_config to return a single scalar when
      reading existing values.
      
      SVN UUIDs should never have whitespace in them, and SVN
      repository URLs should be URI-escaped, so neither of those
      values we ever see in git-svn should actually have whitespace
      in them.
      
      Thanks to Dennis Schridde for the bug report and Junio for
      helping diagnose this.
      Signed-off-by: NEric Wong <normalperson@yhbt.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      98fa5b68
  6. 12 1月, 2008 4 次提交
  7. 11 1月, 2008 5 次提交
  8. 10 1月, 2008 5 次提交
  9. 09 1月, 2008 8 次提交
  10. 08 1月, 2008 3 次提交