1. 23 7月, 2009 4 次提交
    • J
      Merge branch 'maint' · 248b6c06
      Junio C Hamano 提交于
      * maint:
        Trailing whitespace and no newline fix
        diff --cc: a lost line at the beginning of the file is shown incorrectly
        combine-diff.c: fix performance problem when folding common deleted lines
      248b6c06
    • S
      Trailing whitespace and no newline fix · 735c6744
      SZEDER Gábor 提交于
      If a patch adds a new line to the end of a file and this line ends with
      one trailing whitespace character and has no newline, then
      '--whitespace=fix' currently does not remove that trailing whitespace.
      
      This patch fixes this by removing the check for trailing whitespace at
      the end of the line at a hardcoded offset which does not take the
      eventual absence of newline into account.
      Signed-off-by: NSZEDER Gábor <szeder@ira.uka.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      735c6744
    • J
      diff --cc: a lost line at the beginning of the file is shown incorrectly · b810cbbd
      Junio C Hamano 提交于
      When combine-diff inspected the diff from one parent to the merge result,
      it misinterpreted a header in the form @@ -l,k +0,0 @@.
      
      This hunk header means that K lines were removed from the beginning of the
      file, so the lost lines must be queued to the sline that represents the
      first line of the merge result, but we incremented our pointer incorrectly
      and ended up queuing it to the second line, which in turn made the lossage
      appear _after_ the first line.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      b810cbbd
    • J
      combine-diff.c: fix performance problem when folding common deleted lines · 55d5d5ba
      Junio C Hamano 提交于
      For a deleted line in a patch with the parent we are looking at, the
      append_lost() function finds the same line among a run of lines that were
      deleted from the same location by patches from parents we previously
      checked.  This is so that patches with two parents
      
          @@ -1,4 +1,3 @@    @@ -1,4 +1,3 @@
           one                   one
          -two                  -two
           three                 three
          -quatro               -fyra
          +four                 +four
      
      can be coalesced into this sequence, reusing one line that describes the
      removal of "two" for both parents.
      
         @@@ -1,4 -1,4 +1,3 @@@
           one
         --two
           three
         - quatro
          -frya
         ++four
      
      While reading the second patch (that removes "two" and then "fyra"), after
      finding where removal of the "two" matches, we need to find existing
      removal of "fyra" (if exists) in the removal list, but the match has to
      happen after all the existing matches (in this case "two").  The code used
      a naïve O(n^2) algorithm to compute this by scanning the whole removal
      list over and over again.
      
      This patch remembers where the next scan should be started in the existing
      removal list to avoid this.
      
      Noticed by Linus Torvalds.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      55d5d5ba
  2. 20 7月, 2009 2 次提交
  3. 19 7月, 2009 6 次提交
  4. 17 7月, 2009 2 次提交
  5. 16 7月, 2009 1 次提交
    • J
      Revert "mailinfo: Remove only one set of square brackets" · 4525e8e4
      Junio C Hamano 提交于
      This reverts commit 650d30d8.
      
      Some mailing lists are configured add prefix "[listname] " to all their
      messages, and also people hand-edit subject lines, be it an output from
      format-patch or a patch generated by some other means.
      
      We cannot stop people from mucking with the subject line, and with the
      change, there always will be need for hand editing the subject when that
      happens.  People have depended on the leading [bracketed string] removal.
      4525e8e4
  6. 15 7月, 2009 3 次提交
    • L
      Fix extraneous lstat's in 'git checkout -f' · 05c1da2f
      Linus Torvalds 提交于
      In our 'oneway_merge()' we always do an 'lstat()' to see if we might
      need to mark the entry for updating.
      
      But we really shouldn't need to do that when the cache entry is already
      marked as being ce_uptodate(), and this makes us do unnecessary lstat()
      calls if we have index preloading enabled.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      05c1da2f
    • L
      Improve on the 'invalid object' error message at commit time · a3883734
      Linus Torvalds 提交于
      Not that anybody should ever get it, but somebody did (probably because
      of a flaky filesystem, but whatever).  And each time I see an error
      message that I haven't seen before, I decide that next time it will look
      better.
      
      So this makes us write more relevant information about exactly which
      file ended up having issues with a missing object.  Which will tell
      whether it was a tree object, for example, or just a regular file in the
      index (and which one).
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      a3883734
    • L
      Make 'git show' more useful · f222abde
      Linus Torvalds 提交于
      For some reason, I ended up doing
      
      	git show HEAD~5..
      
      as an odd way of asking for a log. I realize I should just have used "git
      log", but at the same time it does make perfect conceptual sense. After
      all, you _could_ have done
      
      	git show HEAD HEAD~1 HEAD~2 HEAD~3 HEAD~4
      
      and saying "git show HEAD~5.." is pretty natural. It's not like "git show"
      only ever showed a single commit (or other object) before either! So
      conceptually, giving a commit range is a very sensible operation, even
      though you'd traditionally have used "git log" for that.
      
      However, doing that currently results in an error
      
      	fatal: object ranges do not make sense when not walking revisions
      
      which admittedly _also_ makes perfect sense - from an internal git
      implementation standpoint in 'revision.c'.
      
      However, I think that asking to show a range makes sense to a user, while
      saying "object ranges no not make sense when not walking revisions" only
      makes sense to a git developer.
      
      So on the whole, of the two different "makes perfect sense" behaviors, I
      think I originally picked the wrong one. And quite frankly, I don't really
      see anybody actually _depending_ on that error case. So why not change it?
      
      So rather than error out, just turn that non-walking error case into a
      "silently turn on walking" instead.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      f222abde
  7. 14 7月, 2009 3 次提交
  8. 12 7月, 2009 3 次提交
  9. 11 7月, 2009 9 次提交
  10. 10 7月, 2009 4 次提交
  11. 09 7月, 2009 3 次提交