diff options
author | scott Chacon <schacon@agadorsparticus.(none)> | 2007-11-17 08:22:49 -0800 |
---|---|---|
committer | scott Chacon <schacon@agadorsparticus.(none)> | 2007-11-17 08:22:49 -0800 |
commit | b0d47b3112b00cb6c1ae72d6d8a43e583af117ea (patch) | |
tree | 5d8094a62450a88ccc542a7a19e724004fdb8ca8 /lib/git | |
parent | ba0f3cc565d051e79db634dbff1f1d4c71291461 (diff) | |
download | third_party-ruby-git-b0d47b3112b00cb6c1ae72d6d8a43e583af117ea.tar.gz third_party-ruby-git-b0d47b3112b00cb6c1ae72d6d8a43e583af117ea.tar.xz third_party-ruby-git-b0d47b3112b00cb6c1ae72d6d8a43e583af117ea.zip |
significantly improved log performance
Diffstat (limited to 'lib/git')
-rw-r--r-- | lib/git/lib.rb | 2 | ||||
-rw-r--r-- | lib/git/log.rb | 4 | ||||
-rw-r--r-- | lib/git/object.rb | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/git/lib.rb b/lib/git/lib.rb index 76223de..c22042f 100644 --- a/lib/git/lib.rb +++ b/lib/git/lib.rb @@ -62,7 +62,7 @@ module Git arr_opts = ['--pretty=oneline'] arr_opts << "-#{opts[:count]}" if opts[:count] arr_opts << "--since=\"#{opts[:since]}\"" if opts[:since].is_a? String - arr_opts << "#{opts[:between][0]}..#{opts[:between][1].to_s}" if (opts[:between] && opts[:between].size == 2) + arr_opts << "#{opts[:between][0].to_s}..#{opts[:between][1].to_s}" if (opts[:between] && opts[:between].size == 2) arr_opts << opts[:object] if opts[:object].is_a? String arr_opts << '-- ' + opts[:path_limiter] if opts[:path_limiter].is_a? String diff --git a/lib/git/log.rb b/lib/git/log.rb index eb625f3..c91538d 100644 --- a/lib/git/log.rb +++ b/lib/git/log.rb @@ -41,12 +41,12 @@ module Git def between(sha1, sha2 = nil) dirty_log - @between = [@base.lib.revparse(sha1), @base.lib.revparse(sha2)] + @between = [sha1, sha2] return self end def to_s - self.map { |c| c.sha }.join("\n") + self.map { |c| c.to_s }.join("\n") end diff --git a/lib/git/object.rb b/lib/git/object.rb index 2468615..aeeae89 100644 --- a/lib/git/object.rb +++ b/lib/git/object.rb @@ -42,7 +42,7 @@ module Git end def to_s - sha + @objectish end def grep(string, path_limiter = nil, opts = {}) |