1. 15 7月, 2005 1 次提交
  2. 14 7月, 2005 2 次提交
  3. 09 7月, 2005 1 次提交
  4. 20 6月, 2005 1 次提交
    • J
      [PATCH] Make -C less eager. · 4727f640
      Junio C Hamano 提交于
      Like diff-tree, this patch makes -C option for diff-* brothers
      to use only pre-image of modified files as rename/copy detection
      by default.  Give --find-copies-harder to use unmodified files
      to find copies from as well.
      
      This also fixes "diff-files -C" problem earlier noticed by
      Linus.  It was feeding the null sha1 even when the file in the
      work tree was known to match what is in the index file.  This
      resulted in diff-files showing everything in the project.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      4727f640
  5. 13 6月, 2005 1 次提交
    • J
      [PATCH] Add --diff-filter= output restriction to diff-* family. · f2ce9fde
      Junio C Hamano 提交于
      This is a halfway between debugging aid and a helper to write an
      ultra-smart merge scripts.  The new option takes a string that
      consists of a list of "status" letters, and limits the diff
      output to only those classes of changes, with two exceptions:
      
       - A broken pair (aka "complete rewrite"), does not match D
         (deleted) or N (created).  Use B to look for them.
      
       - The letter "A" in the diff-filter string does not match
         anything itself, but causes the entire diff that contains
         selected patches to be output (this behaviour is similar to
         that of --pickaxe-all for the -S option).
      
      For example,
      
          $ git-rev-list HEAD |
            git-diff-tree --stdin -s -v -B -C --diff-filter=BCR
      
      shows a list of commits that have complete rewrite, copy, or
      rename.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      f2ce9fde
  6. 04 6月, 2005 2 次提交
    • J
      [PATCH] diff: Clean up diff_scoreopt_parse(). · 0e3994fa
      Junio C Hamano 提交于
      This cleans up diff_scoreopt_parse() function that is used to
      parse the fractional notation -B, -C and -M option takes.  The
      callers are modified to check for errors and complain.  Earlier
      they silently ignored malformed input and falled back on the
      default.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      0e3994fa
    • J
      [PATCH] diff: Fix docs and add -O to diff-helper. · ce240675
      Junio C Hamano 提交于
      This patch updates diff documentation and usage strings:
      
       - clarify the semantics of -R.  It is not "output in reverse";
         rather, it is "I will feed diff backwards".  Semantically
         they are different when -C is involved.
      
       - describe -O in usage strings of diff-* brothers.  It was
         implemented, documented but not described in usage text.
      
      Also it adds -O to diff-helper.  Like -S (and unlike -M/-C/-B),
      this option can work on sanitized diff-raw output produced by
      the diff-* brothers.  While we are at it, the call it makes to
      diffcore is cleaned up to use the diffcore_std() like everybody
      else, and the declaration for the low level diffcore routines
      are moved from diff.h (public) to diffcore.h (private between
      diff.c and diffcore backends).
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      ce240675
  7. 02 6月, 2005 1 次提交
    • J
      [PATCH] diff: mode bits fixes · 67574c40
      Junio C Hamano 提交于
      The core GIT repository has trees that record regular file mode
      in 0664 instead of normalized 0644 pattern.  Comparing such a
      tree with another tree that records the same file in 0644
      pattern without content changes with git-diff-tree causes it to
      feed otherwise unmodified pairs to the diff_change() routine,
      which triggers a sanity check routine and barfs.  This patch
      fixes the problem, along with the fix to another caller that
      uses unnormalized mode bits to call diff_change() routine in a
      similar way.
      
      Without this patch, you will see "fatal error" from diff-tree
      when you run git-deltafy-script on the core GIT repository
      itself.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      67574c40
  8. 31 5月, 2005 3 次提交
    • J
      [PATCH] Add -O<orderfile> option to diff-* brothers. · af5323e0
      Junio C Hamano 提交于
      A new diffcore filter diffcore-order is introduced.  This takes
      a text file each of whose line is a shell glob pattern.  Patches
      that match a glob pattern on an earlier line in the file are
      output before patches that match a later line, and patches that
      do not match any glob pattern are output last.
      
      A typical orderfile for git project probably should look like
      this:
      
          README
          Makefile
          Documentation
          *.h
          *.c
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      af5323e0
    • J
      [PATCH] Add -B flag to diff-* brothers. · f345b0a0
      Junio C Hamano 提交于
      A new diffcore transformation, diffcore-break.c, is introduced.
      
      When the -B flag is given, a patch that represents a complete
      rewrite is broken into a deletion followed by a creation.  This
      makes it easier to review such a complete rewrite patch.
      
      The -B flag takes the same syntax as the -M and -C flags to
      specify the minimum amount of non-source material the resulting
      file needs to have to be considered a complete rewrite, and
      defaults to 99% if not specified.
      
      As the new test t4008-diff-break-rewrite.sh demonstrates, if a
      file is a complete rewrite, it is broken into a delete/create
      pair, which can further be subjected to the usual rename
      detection if -M or -C is used.  For example, if file0 gets
      completely rewritten to make it as if it were rather based on
      file1 which itself disappeared, the following happens:
      
          The original change looks like this:
      
      	file0     --> file0' (quite different from file0)
      	file1     --> /dev/null
      
          After diffcore-break runs, it would become this:
      
      	file0     --> /dev/null
      	/dev/null --> file0'
      	file1     --> /dev/null
      
          Then diffcore-rename matches them up:
      
      	file1     --> file0'
      
      The internal score values are finer grained now.  Earlier
      maximum of 10000 has been raised to 60000; there is no user
      visible changes but there is no reason to waste available bits.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      f345b0a0
    • J
      [PATCH] diff: consolidate various calls into diffcore. · befe8639
      Junio C Hamano 提交于
      The three diff-* brothers had a sequence of calls into diffcore
      that were almost identical.  Introduce a new diffcore_std()
      function that takes all the necessary arguments to consolidate
      it.  This will make later enhancements and changing the order of
      diffcore application simpler.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      befe8639
  9. 30 5月, 2005 4 次提交
  10. 24 5月, 2005 2 次提交
  11. 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
  12. 22 5月, 2005 6 次提交
    • J
      [PATCH] The diff-raw format updates. · 81e50eab
      Junio C Hamano 提交于
      Update the diff-raw format as Linus and I discussed, except that
      it does not use sequence of underscore '_' letters to express
      nonexistence.  All '0' mode is used for that purpose instead.
      
      The new diff-raw format can express rename/copy, and the earlier
      restriction that -M and -C _must_ be used with the patch format
      output is no longer necessary.  The patch makes -M and -C flags
      independent of -p flag, so you need to say git-whatchanged -M -p
      to get the diff/patch format.
      
      Updated are both documentations and tests.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      81e50eab
    • J
      [PATCH] Prepare diffcore interface for diff-tree header supression. · 38c6f780
      Junio C Hamano 提交于
      This does not actually supress the extra headers when pickaxe is
      used, but prepares enough support for diff-tree to implement it.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      38c6f780
    • J
      [PATCH] Constness fix for pickaxe option. · 057c7d30
      Junio C Hamano 提交于
      Constness fix for pickaxe option.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      057c7d30
    • J
      [PATCH] Diff overhaul, adding the other half of copy detection. · c3e7fbcb
      Junio C Hamano 提交于
      This patch extends diff-cache and diff-files to report the
      unmodified files to diff-core as well when -C (copy detection)
      is in effect, so that the unmodified files can also be used as
      the source candidates.  The existing test t4003 has been
      extended to cover this case.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      c3e7fbcb
    • J
      [PATCH] Introducing software archaeologist's tool "pickaxe". · 52e95789
      Junio C Hamano 提交于
      This steals the "pickaxe" feature from JIT and make it available
      to the bare Plumbing layer.  From the command line, the user
      gives a string he is intersted in.
      
      Using the diff-core infrastructure previously introduced, it
      filters the differences to limit the output only to the diffs
      between <src> and <dst> where the string appears only in one but
      not in the other.  For example:
      
       $ ./git-rev-list HEAD | ./git-diff-tree -Sdiff-tree-helper --stdin -M
      
      would show the diffs that touch the string "diff-tree-helper".
      
      In real software-archaeologist application, you would typically
      look for a few to several lines of code and see where that code
      came from.
      
      The "pickaxe" module runs after "rename/copy detection" module,
      so it even crosses the file rename boundary, as the above
      example demonstrates.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      52e95789
    • J
      [PATCH] Diff overhaul, adding half of copy detection. · 427dcb4b
      Junio C Hamano 提交于
      This introduces the diff-core, the layer between the diff-tree
      family and the external diff interface engine.  The calls to the
      interface diff-tree family uses (diff_change and diff_addremove)
      have not changed and will not change.  The purpose of the
      diff-core layer is to provide an infrastructure to transform the
      set of differences sent from the applications, before sending
      them to the external diff interface.
      
      The recently introduced rename detection code has been rewritten
      to use the diff-core facility.  When applications send in
      separate creates and deletes, matching ones are transformed into
      a single rename-and-edit diff, and sent out to the external diff
      interface as such.
      
      This patch also enhances the rename detection code further to be
      able to detect copies.  Currently this happens only as long as
      copy sources appear as part of the modified files, but there
      already is enough provision for callers to report unmodified
      files to diff-core, so that they can be also used as copy source
      candidates.  Extending the callers this way will be done in a
      separate patch.
      
      Please see and marvel at how well this works by trying out the
      newly added t/t4003-diff-rename-1.sh test script.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      427dcb4b
  13. 21 5月, 2005 2 次提交
    • L
      sparse cleanup · e99d59ff
      Linus Torvalds 提交于
      Fix various things that sparse complains about:
       - use NULL instead of 0
       - make sure we declare everything properly, or mark it static
       - use proper function declarations ("fn(void)" instead of "fn()")
      
      Sparse is always right.
      e99d59ff
    • J
      [PATCH] Diff-files fix with more tests. · 41174694
      Junio C Hamano 提交于
      The same check we added earlier to update-cache to catch ENOTDIR
      turns out to be missing from diff-files.  This causes a
      difference not being reported when you have DF/DF (a file in a
      subdirectory) in the cache and DF is a file on the filesystem.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      41174694
  14. 20 5月, 2005 2 次提交
    • 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
    • A
      [PATCH] cleanup of in-code names · 667bb59b
      Alexey Nezhdanov 提交于
      Fixes all in-code names that leaved during "big name change".
      Signed-off-by: NAlexey Nezhdanov <snake@penza-gsm.ru>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      667bb59b
  15. 19 5月, 2005 1 次提交
    • 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
  16. 18 5月, 2005 1 次提交
  17. 15 5月, 2005 1 次提交
  18. 14 5月, 2005 1 次提交
  19. 06 5月, 2005 1 次提交
  20. 01 5月, 2005 1 次提交
  21. 30 4月, 2005 1 次提交
    • L
      Rename git core commands to be "git-xxxx" to avoid name clashes. · a3df1801
      Linus Torvalds 提交于
      This also regularizes the make. The source files themselves don't get
      the "git-" prefix, because that's just inconvenient. So instead we just
      make the rule that "git-xxxx" depends on "xxxx.c", and do that for
      all the core programs (ie the old "git-mktag.c" got renamed to just
      "mktag.c" to match everything else).
      
      And "show-diff" got renamed to "git-diff-files" while at it, since
      that's what it really should be to match the other git-diff-xxx cases.
      a3df1801
  22. 28 4月, 2005 2 次提交
  23. 27 4月, 2005 2 次提交