We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 323181e commit d1ed0f9Copy full SHA for d1ed0f9
lib/rugged/repository.rb
@@ -250,6 +250,24 @@ def blob_at(revision, path)
250
(blob.type == :blob) ? blob : nil
251
end
252
253
+ # Get log at path for specified object
254
+ #
255
+ # obj - Object in question
256
+ # path - The String file path.
257
258
+ # Returns an Array of Rugged::Commit objects
259
+ def log_at(obj, path)
260
+ walker = Rugged::Walker.new(self)
261
+ walker.sorting(Rugged::SORT_DATE)
262
+ walker.push(obj.oid)
263
+ en = Enumerator.new do |y|
264
+ walker.each do |commit|
265
+ y << commit if commit.diff(paths: [path]).size > 0
266
+ end
267
268
+ return en
269
270
+
271
def fetch(remote_or_url, *args, **kwargs)
272
unless remote_or_url.kind_of? Remote
273
remote_or_url = remotes[remote_or_url] || remotes.create_anonymous(remote_or_url)
0 commit comments