1. 22 5月, 2005 3 次提交
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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
  7. 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
  8. 26 4月, 2005 1 次提交