We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4d8ae7f commit 76d23d5Copy full SHA for 76d23d5
lib/rugged/repository.rb
@@ -207,6 +207,24 @@ def blob_at(revision, path)
207
(blob.type == :blob) ? blob : nil
208
end
209
210
+ # Get log at path for specified object
211
+ #
212
+ # obj - Object in question
213
+ # path - The String file path.
214
215
+ # Returns an Array of Rugged::Commit objects
216
+ def log_at(obj, path)
217
+ walker = Rugged::Walker.new(self)
218
+ walker.sorting(Rugged::SORT_DATE)
219
+ walker.push(obj)
220
+ en = Enumerator.new do |y|
221
+ walker.each do |commit|
222
+ y << commit if commit.diff(paths: [path]).size > 0
223
+ end
224
225
+ return en
226
227
+
228
def fetch(remote_or_url, *args)
229
unless remote_or_url.kind_of? Remote
230
remote_or_url = remotes[remote_or_url] || remotes.create_anonymous(remote_or_url)
0 commit comments