1. 23 7月, 2009 6 次提交
    • Y
      List send-email config options in config.txt. · 65180c66
      Yann Dirson 提交于
      Also mention deprecated aliases that do not appear in the send-email
      manpage.
      Signed-off-by: NYann Dirson <ydirson@altern.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      65180c66
    • B
      configure.ac: rework/fix the NEEDS_RESOLV and NEEDS_LIBGEN tests · a1142892
      Brandon Casey 提交于
      The "action" parameters for these two tests were supplied incorrectly for
      the way the tests were implemented.  The tests check whether a program
      which calls hstrerror() or basename() successfully links when -lresolv or
      -lgen are used, respectively.  A successful linking would result in
      NEEDS_RESOLV or NEEDS_LIBGEN being unset, and failure would result in
      setting the respective variable.
      
      Aside from that issue, the tests did not handle the case where neither
      library was necessary for accessing the functions in question.  So solve
      both of these issues by re-working the two tests so that their form is like
      the NEEDS_SOCKET test which attempts to link with just the c library, and
      if it fails then assumes that the additional library is necessary and sets
      the appropriate variable.
      
      Also an entry in the config.mak.in file is necessary for the NEEDS_LIBGEN
      variable to appear in the config.mak.autogen file with the value assigned
      by the configure script.  Without it, the generated shell script would
      contain a snippet like this:
      
         for ac_lib in ; do
            ...
      
      which is incorrect.
      Signed-off-by: NBrandon Casey <drafnel@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      a1142892
    • 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 1 次提交
    • J
      Makefile: install 'git' in execdir · 4ecbc178
      Jeff King 提交于
      When a git command executes a subcommand, it uses the "git
      foo" form, which relies on finding "git" in the PATH.
      Normally this should not be a problem, since the same "git"
      that was used to invoke git in the first place will be
      found.  And if somebody invokes a "git" outside of the PATH
      (e.g., by giving its absolute path), this case is already
      covered: we put that absolute path onto the front of PATH.
      
      However, if one is using "sudo", then sudo will execute the
      "git" from the PATH, but pass along a restricted PATH that
      may not contain the original "git" directory. In this case,
      executing a subcommand will fail.
      
      To solve this, we put the "git" wrapper itself into the
      execdir; this directory is prepended to the PATH when git
      starts, so the wrapper will always be found.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      4ecbc178