1. 26 8月, 2010 2 次提交
    • E
      tree-walk: Correct bitrotted comment about tree_entry() · 2244eab0
      Elijah Newren 提交于
      There was a code comment that referred to the "above two functions" but
      over time the functions immediately preceding the comment have changed.
      Just mention the relevant functions by name.
      Signed-off-by: NElijah Newren <newren@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      2244eab0
    • L
      Fix 'git log' early pager startup error case · 1fda91b5
      Linus Torvalds 提交于
      We start the pager too early for several git commands, which results in
      the errors sometimes going to the pager rather than show up as errors.
      
      This is often hidden by the fact that we pass in '-X' to less by default,
      which causes 'less' to exit for small output, but if you do
      
        export LESS=-S
      
      you can then clearly see the problem by doing
      
        git log --prretty
      
      which shows the error message ("fatal: unrecognized argument: --prretty")
      being sent to the pager.
      
      This happens for pretty much all git commands that use USE_PAGER, and then
      check arguments separately. But "git diff" does it too early too (even
      though it does an explicit setup_pager() call)
      
      This only fixes it for the trivial "git log" family case.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      1fda91b5
  2. 25 8月, 2010 2 次提交
  3. 23 8月, 2010 1 次提交
  4. 22 8月, 2010 2 次提交
  5. 21 8月, 2010 9 次提交
  6. 20 8月, 2010 3 次提交
  7. 19 8月, 2010 1 次提交
  8. 16 8月, 2010 1 次提交
  9. 14 8月, 2010 2 次提交
    • J
      diff --follow: do call diffcore_std() as necessary · 44c48a90
      Junio C Hamano 提交于
      Usually, diff frontends populate the output queue with filepairs without
      any rename information and call diffcore_std() to sort the renames out.
      When --follow is in effect, however, diff-tree family of frontend has a
      hack that looks like this:
      
          diff-tree frontend
          -> diff_tree_sha1()
             . populate diff_queued_diff
             . if --follow is in effect and there is only one change that
               creates the target path, then
             -> try_to_follow_renames()
      	  -> diff_tree_sha1() with no pathspec but with -C
      	  -> diffcore_std() to find renames
      	  . if rename is found, tweak diff_queued_diff and put a
      	    single filepair that records the found rename there
          -> diffcore_std()
             . tweak elements on diff_queued_diff by
             - rename detection
             - path ordering
             - pickaxe filtering
      
      We need to skip parts of the second call to diffcore_std() that is related
      to rename detection, and do so only when try_to_follow_renames() did find
      a rename.  Earlier 1da6175d (Make diffcore_std only can run once before a
      diff_flush, 2010-05-06) tried to deal with this issue incorrectly; it
      unconditionally disabled any second call to diffcore_std().
      
      This hopefully fixes the breakage.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      44c48a90
    • J
      diff --follow: do not waste cycles while recursing · 39f75d26
      Junio C Hamano 提交于
      The "--follow" logic is called from diff_tree_sha1() function, but the
      input trees to diff_tree_sha1() are not necessarily the top-level trees
      (compare_tree_entry() calls it while it recursively descends into
      subtrees).  When a newly created path lives in somewhere deep in the
      source hierarchy, e.g. "platform/", but the rename source is in a totally
      different place in the destination hierarchy, e.g. "lang-api/src/com/...",
      running "try_to_find_renames()" while base is set to "platform/" is a
      wasted call.
      
      We only need to run the rename following at the very top level.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      Acked-by: NLinus Torvalds <torvalds@linux-foundation.org>
      39f75d26
  10. 13 8月, 2010 4 次提交
  11. 12 8月, 2010 7 次提交
  12. 10 8月, 2010 6 次提交