1. 24 3月, 2012 3 次提交
    • J
      teach diffcore-rename to optionally ignore empty content · 90d43b07
      Jeff King 提交于
      Our rename detection is a heuristic, matching pairs of
      removed and added files with similar or identical content.
      It's unlikely to be wrong when there is actual content to
      compare, and we already take care not to do inexact rename
      detection when there is not enough content to produce good
      results.
      
      However, we always do exact rename detection, even when the
      blob is tiny or empty. It's easy to get false positives with
      an empty blob, simply because it is an obvious content to
      use as a boilerplate (e.g., when telling git that an empty
      directory is worth tracking via an empty .gitignore).
      
      This patch lets callers specify whether or not they are
      interested in using empty files as rename sources and
      destinations. The default is "yes", keeping the original
      behavior. It works by detecting the empty-blob sha1 for
      rename sources and destinations.
      
      One more flexible alternative would be to allow the caller
      to specify a minimum size for a blob to be "interesting" for
      rename detection. But that would catch small boilerplate
      files, not large ones (e.g., if you had the GPL COPYING file
      in many directories).
      
      A better alternative would be to allow a "-rename"
      gitattribute to allow boilerplate files to be marked as
      such. I'll leave the complexity of that solution until such
      time as somebody actually wants it. The complaints we've
      seen so far revolve around empty files, so let's start with
      the simple thing.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      90d43b07
    • J
      make is_empty_blob_sha1 available everywhere · f8582cad
      Jeff King 提交于
      The read-cache implementation defines this static function,
      but it is a generally useful concept in git. Let's give
      the empty blob the same treatment as the empty tree,
      providing both hex and binary forms of the sha1.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      f8582cad
    • J
      drop casts from users EMPTY_TREE_SHA1_BIN · cba595bd
      Jeff King 提交于
      This macro already evaluates to the correct type, as it
      casts the string literal to "unsigned char *" itself
      (and callers who want the literal can use the _LITERAL
      form).
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      cba595bd
  2. 21 3月, 2012 5 次提交
  3. 17 3月, 2012 2 次提交
  4. 16 3月, 2012 9 次提交
    • J
      Update draft release notes to 1.7.10 · bc62ca13
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      bc62ca13
    • J
      Merge branch 'th/mergetools-deltawalker' · 0987145d
      Junio C Hamano 提交于
      * th/mergetools-deltawalker:
        Documentation/difftool: add deltawalker to list of valid diff tools
      0987145d
    • J
      Merge branch 'jc/maint-verify-objects-remove-pessimism' · c3117b21
      Junio C Hamano 提交于
      The code to validate the history connectivity between old refs and new
      refs used by fetch and receive-pack, introduced in 1.7.8, was grossly
      inefficient and unnecessarily tried to re-validate integrity of individual
      objects. This essentially reverts that performance regression.
      
      * jc/maint-verify-objects-remove-pessimism:
        fetch/receive: remove over-pessimistic connectivity check
      c3117b21
    • J
      Merge branch 'sl/customize-sane-tool-path' · 9721d2fb
      Junio C Hamano 提交于
      * sl/customize-sane-tool-path:
        configure: allow user to prevent $PATH "sanitization" on Solaris
      9721d2fb
    • J
      Merge "two fixes for fast-import's 'ls' command" from Jonathan · 5087aace
      Junio C Hamano 提交于
      Andrew Sayers noticed that the svn-fe | git fast-import pipeline
      mishandles a subversion history that copies the root directory to a
      sub-directory (e.g. doing `svn cp . trunk` to standardise your
      layout).  As David Barr explained, the bug arises when the following
      command is sent to git fast-import:
      
        'ls' SP ':1' SP LF
      
      Instead of reading back what is at the root of r1, it unconditionally
      reports the path as missing.
      
      After sleeping on it, here are two patches for 'maint'.  One plugs a
      memory leak.  The other ensures that trying to pass an empty path to
      the 'ls' command results in an error message that can help the
      frontend author instead of the silently broken conversion Andrew
      found.
      
      Then we can carefully add 'ls ""' support in 1.7.11.
      
      * commit 'refs/pull-request-tags/jn/maint-fast-import-empty-ls':
        fast-import: don't allow 'ls' of path with empty components
        fast-import: leakfix for 'ls' of dirty trees
      5087aace
    • J
      Merge branch 'th/git-diffall' · a99c5e59
      Junio C Hamano 提交于
      * th/git-diffall:
        contrib/diffall: fix cleanup trap on Windows
        contrib/diffall: eliminate duplicate while loops
        contrib/diffall: eliminate use of tar
        contrib/diffall: create tmp dirs without mktemp
        contrib/diffall: comment actual reason for 'cdup'
      a99c5e59
    • J
      Merge branch 'th/doc-diff-submodule-option' · c58499c3
      Junio C Hamano 提交于
      * th/doc-diff-submodule-option:
        Documentation/diff-options: reword description of --submodule option
      c58499c3
    • J
      fetch/receive: remove over-pessimistic connectivity check · d21c463d
      Junio C Hamano 提交于
      Git 1.7.8 introduced an object and history re-validation step after
      "fetch" or "push" causes new history to be added to a receiving
      repository. This is to protect a malicious server or pushing client from
      corrupting the repository by taking advantage of an existing corrupt
      object that is unconnected to existing history.
      
      But this check is way over-pessimistic.  During "fetch" or "receive-pack"
      (the server side of "push"), unpack-objects and index-pack already
      validate individual objects that are received, and the only thing we would
      want to catch are corrupted objects that already happen to exist in our
      repository but are not referenced from our refs.  Such objects must have
      been written by an earlier run of our codepaths that write out loose
      objects or packfiles, and they must have done the validation of individual
      objects when they did so.  The only thing left to worry about is the
      connectivity integrity, which can be checked with "rev-list --objects",
      which is much cheaper.  We have been paying the 5x to 8x runtime overhead
      the --verify-objects often adds for no real gain.
      
      Revert check_everything_connected() not to use this over-pessimistic
      check.
      
      Credit goes to Nguyễn Thái Ngọc Duy, who originally identified the
      performance regression and endured multiple rounds of reviews to fix it.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      d21c463d
    • T
      Documentation/difftool: add deltawalker to list of valid diff tools · 79e0fe63
      Tim Henigan 提交于
      deltawalker has been supported since 284a126c, but was not added
      to the list of valid diff tools reported by 'git difftool --help'.
      Signed-off-by: NTim Henigan <tim.henigan@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      79e0fe63
  5. 15 3月, 2012 7 次提交
  6. 14 3月, 2012 5 次提交
    • J
      Merge branch 'jc/i18n-shell-script-gettext' · d973dc01
      Junio C Hamano 提交于
      The auto detection was testing if a fixed string that is known to be
      non-empty is empty by mistake.
      
      * jc/i18n-shell-script-gettext:
        i18n: fix auto detection of gettext scheme for shell scripts
      d973dc01
    • J
      Merge branch 'jc/maint-undefined-i18n-observation-test' · 8de55e37
      Junio C Hamano 提交于
      It was unclear what a test in t0204 wanted to check; it turns out
      that it was only to observe an undefined behaviour of the system,
      and did not anticipate one kind of reasonable error behaviour.
      
      * jc/maint-undefined-i18n-observation-test:
        t0204: clarify the "observe undefined behaviour" test
      8de55e37
    • J
      Merge branch 'ms/maint-config-error-at-eol-linecount' · 3f263099
      Junio C Hamano 提交于
      When "git config" diagnoses an error in a configuration file and
      shows the line number for the offending line, it miscounted if the
      error was at the end of line.
      
      By Martin Stenberg
      * ms/maint-config-error-at-eol-linecount:
        config: report errors at the EOL with correct line number
      
      Conflicts:
      	t/t1300-repo-config.sh
      3f263099
    • J
      Merge branch 'ph/rerere-doc' · 9d9bfea8
      Junio C Hamano 提交于
      By Phil Hord
      * ph/rerere-doc:
        rerere: Document 'rerere remaining'
      9d9bfea8
    • J
      am: officially deprecate -b/--binary option · 6c15a1c6
      Junio C Hamano 提交于
      We have had these options as harmless no-op for more than 3 years without
      officially deprecating them.  Let's announce the deprecation and start
      warning against their use, but without failing the command just not yet,
      so that we can later repurpose the option if we want to in the future.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      6c15a1c6
  7. 13 3月, 2012 9 次提交