public
Fork of mojombo/grit
Description: Grit is a Ruby library for extracting information from a git repository in an object oriented manner.
Homepage: http://grit.rubyforge.org/
Clone URL: git://github.com/technoweenie/grit.git
enable --all for Commit.find_all
mojombo (author)
Thu Mar 06 00:38:32 -0800 2008
commit  179f919876a255a8e09d32a95c8209d66c7ed660
tree    b1281e51087f91e527efbeb2872903585c747fee
parent  55737f3f9128b02bf3519f5f70b6118234454c65
...
105
106
107
108
 
109
110
111
...
117
118
119
120
 
 
 
 
 
121
122
123
...
105
106
107
 
108
109
110
111
...
117
118
119
 
120
121
122
123
124
125
126
127
0
@@ -105,7 +105,7 @@ module Grit
0
     
0
     # Find all commits matching the given criteria.
0
     # +repo+ is the Repo
0
- # +ref+ is the ref from which to begin (SHA1 or name)
0
+ # +ref+ is the ref from which to begin (SHA1 or name) or nil for --all
0
     # +options+ is a Hash of optional arguments to git
0
     # :max_count is the maximum number of commits to fetch
0
     # :skip is the number of commits to skip
0
@@ -117,7 +117,11 @@ module Grit
0
       default_options = {:pretty => "raw"}
0
       actual_options = default_options.merge(options)
0
       
0
- output = repo.git.rev_list(actual_options, ref)
0
+ if ref
0
+ output = repo.git.rev_list(actual_options, ref)
0
+ else
0
+ output = repo.git.rev_list(actual_options.merge(:all => true))
0
+ end
0
       
0
       self.list_from_string(repo, output)
0
     end
...
87
88
89
 
90
91
92
93
 
 
94
95
96
...
87
88
89
90
91
92
 
 
93
94
95
96
97
0
@@ -87,10 +87,11 @@ module Grit
0
     # Commits are returned in chronological order.
0
     # +start+ is the branch/commit name (default 'master')
0
     # +since+ is a string represeting a date/time
0
+ # +extra_options+ is a hash of extra options
0
     #
0
     # Returns Grit::Commit[] (baked)
0
- def commits_since(start = 'master', since = '1970-01-01')
0
- options = {:since => since}
0
+ def commits_since(start = 'master', since = '1970-01-01', extra_options = {})
0
+ options = {:since => since}.merge(extra_options)
0
       
0
       Commit.find_all(self, start, options)
0
     end

Comments

    No one has commented yet.