1. 03 Mar, 2009 1 commit
    • René Scharfe's avatar
      diffcore-pickaxe: use memmem() · ce163c79
      René Scharfe authored
      Use memmem() instead of open-coding it.  The system libraries usually have a
      much faster version than the memcmp()-loop here.  Even our own fall-back in
      compat/, which is used on Windows, is slightly faster.
      
      The following commands were run in a Linux kernel repository and timed, the
      best of five results is shown:
      
        $ STRING='Ensure that the real time constraints are schedulable.'
        $ git log -S"$STRING" HEAD -- kernel/sched.c >/dev/null
      
      On Ubuntu 8.10 x64, before (v1.6.2-rc2):
      
        8.09user 0.04system 0:08.14elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
        0inputs+0outputs (0major+30952minor)pagefaults 0swaps
      
      And with the patch:
      
        1.50user 0.04system 0:01.54elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
        0inputs+0outputs (0major+30645minor)pagefaults 0swaps
      
      On Fedora 10 x64, before:
      
        8.34user 0.05system 0:08.39elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
        0inputs+0outputs (0major+29268minor)pagefaults 0swaps
      
      And with the patch:
      
        1.15user 0.05system 0:01.20elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
        0inputs+0outputs (0major+32253minor)pagefaults 0swaps
      
      On Windows Vista x64, before:
      
        real    0m9.204s
        user    0m0.000s
        sys     0m0.000s
      
      And with the patch:
      
        real    0m8.470s
        user    0m0.000s
        sys     0m0.000s
      Signed-off-by: default avatarRene Scharfe <rene.scharfe@lsrfire.ath.cx>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      ce163c79
  2. 01 Mar, 2009 1 commit
  3. 28 Feb, 2009 8 commits
  4. 27 Feb, 2009 6 commits
    • Christian Couder's avatar
      bisect: fix another instance of eval'ed string · cce074a2
      Christian Couder authored
      When there is nothing to be skipped, the output from
      rev-list --bisect-vars was eval'ed without first being
      strung together with &&; this is probably not a problem
      as it is much less likely to be a bad input than the list
      handcrafted by the filter_skip function, but it still is
      a good discipline.
      Signed-off-by: Christian Couder's avatarChristian Couder <chriscool@tuxfamily.org>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      cce074a2
    • Junio C Hamano's avatar
      Merge branch 'cc/maint-1.6.0-bisect-fix' · 0c347356
      Junio C Hamano authored
      * cc/maint-1.6.0-bisect-fix:
        bisect: fix quoting TRIED revs when "bad" commit is also "skip"ped
      
      Conflicts:
      	git-bisect.sh
      0c347356
    • Christian Couder's avatar
      bisect: fix quoting TRIED revs when "bad" commit is also "skip"ped · 1b249ffe
      Christian Couder authored
      When the "bad" commit was also "skip"ped and when more than one
      commit was skipped, the "filter_skipped" function would have
      printed something like:
      
          bisect_rev=<hash1>|<hash2>
      
      (where <hash1> and <hash2> are hexadecimal sha1 hashes)
      
      and this would have been evaled later as piping "bisect_rev=<hash1>"
      into "<hash2>", which would have failed.
      
      So this patch makes the "filter_skipped" function properly quote
      what it outputs, so that it will print something like:
      
      bisect_rev='<hash1>|<hash2>'
      
      which will be properly evaled later.  The caller was not stopping
      properly because the scriptlet this function returned to be evaled
      was not strung together with && and because of this, an error in
      an earlier part of the output was simply ignored.
      
      A test case is added to the test suite.
      
      And while at it, we also initialize the VARS, FOUND and TRIED
      variables, so that we protect ourselves from environment variables
      the user may have with these names.
      Signed-off-by: Christian Couder's avatarChristian Couder <chriscool@tuxfamily.org>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      1b249ffe
    • Junio C Hamano's avatar
      git-am: make --abort less dangerous · 2d56a136
      Junio C Hamano authored
      When you are in the middle of "git rebase", "git am --abort" by mistake
      would have referred to nonexistent ORIG_HEAD and barfed, or worse yet, used
      a stale ORIG_HEAD and taken you to an unexpected commit.
      
      Also the option parsing did not reject "git am --abort --skip".
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      2d56a136
    • Michael J Gruber's avatar
      git-am: Keep index in case of abort with dirty index · c767184d
      Michael J Gruber authored
      git am --abort resets the index unconditionally. But in case a previous
      git am exited due to a dirty index it is preferable to keep that index.
      Make it so.
      Signed-off-by: default avatarMichael J Gruber <git@drmicha.warpmail.net>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      c767184d
    • Jay Soffian's avatar
      t5540-http-push.sh: avoid non-portable grep -P · 2591838b
      Jay Soffian authored
      OS X's GNU grep does not support -P/--perl-regexp.
      
      We use a basic RE instead, and simplify the pattern slightly by
      replacing '+' with '*' so it can be more easily expressed using a basic
      RE.  The important part of pattern, checking for a SHA-1 has suffix in
      the successful PUT/MOVE operations, remains the same.  Also, a-z instead
      of a-f was an obvious mistake in the original RE. Here are samples of
      what we want to match:
      
      127.0.0.1 - - [26/Feb/2009:22:38:13 +0000] "PUT /test_repo.git/objects/3e/a4fbb9e18a401a6463c595d08118fcb9fb7426_fab55116904c665a95438bcc78521444a7db6096 HTTP/1.1" 201 277
      127.0.0.1 - - [26/Feb/2009:22:38:13 +0000] "MOVE /test_repo.git/objects/3e/a4fbb9e18a401a6463c595d08118fcb9fb7426_fab55116904c665a95438bcc78521444a7db6096 HTTP/1.1" 201 277
      Signed-off-by: default avatarJay Soffian <jaysoffian@gmail.com>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      2591838b
  5. 26 Feb, 2009 1 commit
  6. 25 Feb, 2009 15 commits
  7. 24 Feb, 2009 2 commits
  8. 23 Feb, 2009 4 commits
  9. 21 Feb, 2009 2 commits