Граф коммитов

412 Коммитов

Автор SHA1 Сообщение Дата
Ryan Tomayko 889adf545e Git#native can optionally raise an exception when command exits non-zero 2010-12-09 17:32:55 -08:00
Ryan Tomayko 96f604c007 Git#native takes environment for git child process 2010-12-09 17:05:43 -08:00
Ryan Tomayko ce31d0d54a separate argv in calls to Git#native 2010-12-09 15:43:48 -08:00
Ryan Tomayko 1cfcc1b802 avoid /bin/sh + escaping; exec git commands directly
This removes some overhead from all native git calls in the
following ways:

 - Removes a fork previously performed by Open3, which double
   forks to avoid needing to Process::wait.
 - Removes the need to shell escape arguments, since the git
   process's argv is passed explicitly as an array.
 - Removes the /bin/sh process (1 fork/exec)

Additionally, these changes allow obtaining the git process's exit
status, available as $? after any native git command invocations.
2010-12-09 15:30:53 -08:00
Ryan Tomayko 2296c23d92 locate git_binary on PATH at boot
Avoids starting a /bin/sh and /usr/bin/env process on each
native command invocation, and will allow exec'ing the
command directly.
2010-12-09 15:30:53 -08:00
Ryan Tomayko 6b7dff52aa update History.txt with bug fix merges 2010-12-09 13:50:17 -08:00
Ryan Tomayko e3be659a93 Merge remote branch 'ohnobinki/master' 2010-12-09 13:47:15 -08:00
Ryan Tomayko ac394d42a8 Merge remote branch 'koraktor/fix-init-bare' 2010-12-09 13:43:21 -08:00
Ryan Tomayko 3b94889cab Merge commit 'bfe14d6403fd701cb131' 2010-12-09 13:38:43 -08:00
rick e2ad571c4d less fragile actor output test 2010-12-08 16:17:06 -08:00
Ryan Tomayko 034fc81903 typo 2010-11-23 21:17:22 -08:00
Ryan Tomayko 7fc2b567f3 fix relative alternates paths
Relative paths in a <repo>.git/objects/info/alternates file are to
be expanded relative to the <repo>.git/objects directory.
Previously, they were expanded relative to the <repo>.git directory.

The current code checks in both locations for backward compatibility
with grit <= 2.3.0 but I'd rather rip it out completely.
2010-11-23 16:51:36 -08:00
Ryan Tomayko 62d2ce1cd1 avoid exists check when loading alternates 2010-11-22 16:04:08 -08:00
Martin Traverso bfe14d6403 fix issue where Repo#diff skips the first diff 2010-11-05 23:10:26 -07:00
rick 8d5e137b26 fix regression in Grit::Index#commit 2010-11-01 10:48:20 -07:00
Sebastian Staudt d6a479d78a Fixed and improved Repo.init_bare tests 2010-11-01 09:43:20 +01:00
Sebastian Staudt d22fa1df0e Fixed Repo.init_bare for non ".git" suffixes 2010-11-01 09:23:22 +01:00
rick 2ed88699f6 document rtomayko's perf enhancements 2010-10-28 12:57:56 -07:00
rick 589ab1e601 Merge branch 'perf' 2010-10-28 12:56:45 -07:00
rick 22a06b528c fix regression with actor argument in Grit::Index#commit 2010-10-28 12:46:26 -07:00
rick aac47d734a set parent correctly from options passed to Grit::Index#commit 2010-10-22 15:05:37 +02:00
rick 1546764420 update history 2010-10-22 14:09:37 +02:00
rick a8e2e6c959 allow Index#commit to specify separate authors and committers with correct timezones for the timestamps 2010-10-22 14:01:11 +02:00
rick 8ca71b2395 Index#commit takes options and can specify a custom committed date 2010-10-21 15:53:59 +02:00
Ryan Tomayko 462e405c1a packing and unpacking uses String#<< instead of String#+ 2010-10-16 05:05:58 -07:00
Ryan Tomayko 8f574aa62d Git#sh uses 8K buffers instead of 1K 2010-10-16 04:53:37 -07:00
Ryan Tomayko 1089200379 use String#<< instead of String#+ in Git#sh and Git#wild_sh
This speeds things up considerably when output is large. Especially
so under some versions of Rails (AS) where String#+ is made to be
extremely slow.

With 500K blob, before:

    $ ruby bench-string-concat.rb 12044a7603
    blob: 12044a7603
    size: 499855
                                        user     system      total        real
    native cat_file                11.030000   9.140000  20.230000 ( 21.182163)
    ruby cat_file                   0.040000   0.020000   0.060000 (  0.061033)

ActiveSupport makes it even worse:

    $ ruby -ractive_support bench-string-concat.rb 12044a7603
    blob: 12044a7603
    size: 499855
                                        user     system      total        real
    native cat_file                15.830000   9.570000  25.470000 ( 26.286903)
    ruby cat_file                   0.050000   0.020000   0.070000 (  0.073557)

With this commit applied (using String#<< instead of String#+):

    $ ruby bench-string-concat.rb 12044a7603
    blob: 12044a7603
    size: 499855
                                        user     system      total        real
    native cat_file                 0.310000   0.440000   0.800000 (  1.765703)
    ruby cat_file                   0.040000   0.020000   0.060000 (  0.064426)

The bench-string-concat.rb script is here:

<https://gist.github.com/e749138b066ed9d81fbe>
2010-10-16 04:50:26 -07:00
Nathan Phillip Brink 26769e8b13 Make test_tag.tb agnostic to the the ordering of tags in Grit::Repo's tag list. Fixes issue 34. 2010-10-12 14:08:09 -04:00
rick 13d7f6e3f6 extract Grit::Repo#parse_batch 2010-10-11 15:54:26 -07:00
rick db30f6ab41 update history 2010-10-11 15:34:16 -07:00
rick 28ed49351a add Grit::Repo#batch for getting multiple commits in a single native git call. 2010-10-11 15:33:50 -07:00
rick 120baf9dbc backport from github, attempt to load mime-types locally before loading rubygems 2010-10-07 18:14:39 -07:00
rick f569b05d2f update history 2010-10-07 18:11:27 -07:00
rick 03078546bd backport zero-padding bugfix from github 2010-10-07 18:10:12 -07:00
rick bb47dc1b06 git-notes backport from github 2010-10-07 18:08:43 -07:00
rick 2514a8c91d explicitly make the Grit data classes lazily loaded (instead of every single ruby object). Also, add attr_writer(:lazy_source) for lazy objects 2010-10-07 17:27:34 -07:00
Tom Preston-Werner b8a3d3b374 Release 2.3.0 2010-09-29 13:46:45 -07:00
Tom Preston-Werner 9f2d86b941 Update Readme. 2010-08-31 15:23:03 -07:00
Tom Preston-Werner b279025594 Update tomdoc for Repo#initialize. 2010-08-31 15:11:27 -07:00
Tom Preston-Werner 884a28c4fb Update history for ruby 1.9 compat. 2010-08-30 17:37:38 -07:00
Chris Hoffman 0a80ba282d Ruby 1.9 compatibility
* Add current directory to path for tests because 1.9 does not
* Explicity open file in binary mode to get around encoding issues
2010-08-30 17:37:38 -07:00
Tom Preston-Werner 886960895d Add Repo#init. 2010-08-30 17:37:38 -07:00
Joshua Priddle 0d9d9d75b4 Fixed gemspec homepage 2010-08-30 17:36:46 -07:00
rick 62c8aaebb5 2.2.1 history 2010-08-23 12:02:38 -07:00
rick 72f6382068 revert Grit::Index#commit default value for parents arg 2010-08-23 11:51:19 -07:00
Tom Preston-Werner 8fc7436246 Update History for 2.2.0 release. 2010-08-19 17:57:53 -07:00
Tom Preston-Werner 7609e74e51 Release 2.2.0 2010-08-19 17:55:45 -07:00
Tom Preston-Werner 4da28835e8 Add Grit::Index#delete to allow deletions of files from the index. 2010-08-19 17:54:54 -07:00
gram.gibson@gmail.com 544ae9fbc4 Added attr_reader for @files in Status 2010-08-12 23:48:59 +08:00
Tom Preston-Werner d568d80cc7 Fix release tag pushing. 2010-08-04 19:05:03 -06:00