File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -250,6 +250,24 @@ def blob_at(revision, path)
250250      ( blob . type  == :blob )  ? blob  : nil 
251251    end 
252252
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 ) 
263+       en  =  Enumerator . new  do  |y |
264+         walker . each  do  |commit |
265+           y  << commit  if  commit . diff ( paths : [ path ] ) . size  > 0 
266+         end 
267+       end 
268+       return  en 
269+     end 
270+ 
253271    def  fetch ( remote_or_url ,  *args ) 
254272      unless  remote_or_url . kind_of?  Remote 
255273        remote_or_url  =  remotes [ remote_or_url ]  || remotes . create_anonymous ( remote_or_url ) 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments