1. 30 5月, 2005 3 次提交
    • J
      [PATCH] Optimize diff-tree -[CM] --stdin · f0c6b2a2
      Junio C Hamano 提交于
      This attempts to optimize "diff-tree -[CM] --stdin", which
      compares successible tree pairs.  This optimization does not
      make much sense for other commands in the diff-* brothers.
      
      When reading from --stdin and using rename/copy detection, the
      patch makes diff-tree to read the current index file first.
      This is done to reuse the optimization used by diff-cache in the
      non-cached case.  Similarity estimator can avoid expanding a
      blob if the index says what is in the work tree has an exact
      copy of that blob already expanded.
      
      Another optimization the patch makes is to check only file sizes
      first to terminate similarity estimation early.  In order for
      this to work, it needs a way to tell the size of the blob
      without expanding it.  Since an obvious way of doing it, which
      is to keep all the blobs previously used in the memory, is too
      costly, it does so by keeping the filesize for each object it
      has already seen in memory.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      f0c6b2a2
    • J
      [PATCH] Add --pickaxe-all to diff-* brothers. · 367cec1c
      Junio C Hamano 提交于
      When --pickaxe-all is given in addition to -S, pickaxe shows the
      entire diffs contained in the changeset, not just the diffs for
      the filepair that touched the sought-after string.  This is
      useful to see the changes in context.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      367cec1c
    • J
      [PATCH] Clean up diff_setup() to make it more extensible. · 19feebc8
      Junio C Hamano 提交于
      This changes the argument of diff_setup() from an integer that
      says if we are feeding reversed diff to a bitmask, so that later
      global options can be added more easily.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      19feebc8
  2. 24 5月, 2005 2 次提交
  3. 23 5月, 2005 1 次提交
    • J
      [PATCH] Diffcore updates. · 6b14d7fa
      Junio C Hamano 提交于
      This moves the path selection logic from individual programs to a new
      diffcore transformer (diff-tree still needs to have its own for
      performance reasons).  Also the header printing code in diff-tree was
      tweaked not to produce anything when pickaxe is in effect and there is
      nothing interesting to report.  An interesting example is the following
      in the GIT archive itself:
      
          $ git-whatchanged -p -C -S'or something in a real script'
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      6b14d7fa
  4. 22 5月, 2005 4 次提交
  5. 20 5月, 2005 1 次提交
    • J
      [PATCH] diff overhaul · 57fe64a4
      Junio C Hamano 提交于
      This cleans up the way calls are made into the diff core from diff-tree
      family and diff-helper.  Earlier, these programs had "if
      (generating_patch)" sprinkled all over the place, but those ugliness are
      gone and handled uniformly from the diff core, even when not generating
      patch format.
      
      This also allowed diff-cache and diff-files to acquire -R
      (reverse) option to generate diff in reverse.  Users of
      diff-tree can swap two trees easily so I did not add -R there.
      
      [ Linus' note: I'll add -R to "diff-tree" too, since a "commit
        diff" doesn't have another tree to switch around: the other
        tree is always the parent(s) of the commit ]
      
      Also -M<digits-as-mantissa> suggestion made by Linus has been
      implemented.
      
      Documentation updates are also included.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      57fe64a4
  6. 19 5月, 2005 2 次提交
    • J
      [PATCH] Detect renames in diff family. · 5c97558c
      Junio C Hamano 提交于
      This rips out the rename detection engine from diff-helper and moves it
      to the diff core, and updates the internal calling convention used by
      diff-tree family into the diff core.  In order to give the same option
      name to diff-tree family as well as to diff-helper, I've changed the
      earlier diff-helper '-r' option to '-M' (stands for Move; sorry but the
      natural abbreviation 'r' for 'rename' is already taken for 'recursive').
      
      Although I did a fair amount of test with the git-diff-tree with
      existing rename commits in the core GIT repository, this should still be
      considered beta (preview) release.  This patch depends on the diff-delta
      infrastructure just committed.
      
      This implements almost everything I wanted to see in this series of
      patch, except a few minor cleanups in the calling convention into diff
      core, but that will be a separate cleanup patch.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5c97558c
    • J
      [PATCH] Diff-helper update · 915838c3
      Junio C Hamano 提交于
      This patch adds a framework and a stub implementation of rename
      detection to diff-helper program.
      
      The current stub code is just enough to detect pure renames in
      diff-tree output and not fancier.  The plan is perhaps to use
      the same delta code when Nico's delta storage patch is merged
      for similarity evaluation purposes.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      915838c3
  7. 15 5月, 2005 1 次提交
    • J
      [PATCH 2/3] Rename git-diff-tree-helper to git-diff-helper. · 99665af5
      Junio C Hamano 提交于
      It used to be that diff-tree needed helper support to parse its
      raw output to generate diffs, but these days git-diff-* family
      produces the same output and the helper is not tied to diff-tree
      anymore.  Drop "tree" from its name.
      
      This commit is done separately to record just the rename and no
      file content changes. The changes in the renamed files are recorded
      in the next commit.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      
      Bundled with the changes in the unrenamed files.
      Signed-off-by: NPetr Baudis <pasky@ucw.cz>
      99665af5
  8. 04 5月, 2005 1 次提交
    • J
      Optimize diff-cache -p --cached · b46f0b6d
      Junio C Hamano 提交于
      This patch optimizes "diff-cache -p --cached" by avoiding to
      inflate blobs into temporary files when the blob recorded in the
      cache matches the corresponding file in the work tree.  The file
      in the work tree is passed as the comparison source in such a
      case instead.
      
      This optimization kicks in only when we have already read the
      cache this optimization and this is deliberate.  Especially,
      diff-tree does not use this code, because changes are contained
      in small number of files relative to the project size most of
      the time, and reading cache is so expensive for a large project
      that the cost of reading it outweighs the savings by not
      inflating blobs.
      
      Also this patch cleans up the structure passed from diff clients
      by removing one unused structure member.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      b46f0b6d
  9. 28 4月, 2005 1 次提交
    • J
      [PATCH] Reworked external diff interface. · 77eb2720
      Junio C Hamano 提交于
      This introduces three public functions for diff-cache and friends can
      use to call out to the GIT_EXTERNAL_DIFF program when they wish to.
      
      A normal "add/remove/change" entry is turned into 7-parameter process
      invocation of GIT_EXTERNAL_DIFF program as before.  In addition, the
      program can now be called with a single parameter when diff-cache and
      friends want to report an unmerged path. 
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      77eb2720
  10. 27 4月, 2005 1 次提交
    • J
      [PATCH] Diff-tree-helper take two. · be3cfa85
      Junio C Hamano 提交于
      This reworks the diff-tree-helper and show-diff to further make external
      diff command interface simpler.
      
      These commands now honor GIT_EXTERNAL_DIFF environment variable which
      can point at an arbitrary program that takes 7 parameters:
      
        name file1 file1-sha1 file1-mode file2 file2-sha1 file2-mode
      
      The parameters for an external diff command are as follows:
      
        name        this invocation of the command is to emit diff
      	      for the named cache/tree entry.
      
        file1       pathname that holds the contents of the first
      	      file.  This can be a file inside the working
      	      tree, or a temporary file created from the blob
      	      object, or /dev/null.  The command should not
      	      attempt to unlink it -- the temporary is
      	      unlinked by the caller.
      
        file1-sha1  sha1 hash if file1 is a blob object, or "."
      	      otherwise.
      
        file1-mode  mode bits for file1, or "." for a deleted file.
      
      If GIT_EXTERNAL_DIFF environment variable is not set, the
      default is to invoke diff with the set of parameters old
      show-diff used to use.  This built-in implementation honors the
      GIT_DIFF_CMD and GIT_DIFF_OPTS environment variables as before.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      be3cfa85
  11. 26 4月, 2005 1 次提交