Commits

ZyX_I  committed 297bb98

@aurum/drivers/git: Added faster iterfuncs.ancestors

  • Participants
  • Parent commits e5972d0

Comments (0)

Files changed (2)

File doc/aurum.txt

     that can be accepted by a shell command. Determines information about how 
     many revisions will be obtained by |aurum-rf-getchangesets| and 
     |aurum-rf-revrange| functions and also how many revisions will be 
-    processed by |aurum-repo.iterfuncs| (currently only revrange and 
-    changesets are supported). Zero means that all revisions will be pulled at 
-    once, don’t use this if you are working with large repositories.
+    processed by |aurum-repo.iterfuncs|. Zero means that all revisions will be 
+    pulled at once, don’t use this if you are working with large repositories.
     Note: Setting it to non-zero produces extra shell call used to obtain list 
           of revisions to show. Setting it to zero increases memory 
           consumption, the time in which first log entry can be shown and may 

File plugin/aurum/drivers/git.vim

     let revargs=[]
     let revkwargs={}
     if a:0
-        let revargs+=[a:1.'^..'.a:2]
+        let revargs+=[((a:1 is 0)?(''):(a:1.'^..')).
+                    \ ((a:2 is 0)?(''):(a:2))]
     else
         let revkwargs.all=1
         let revkwargs['full-history']=1
     let pgaargs=[a:repo]
     if has_key(a:opts, 'revrange')
         let pgaargs+=a:opts.revrange
+    elseif has_key(a:opts, 'revision')
+        let pgaargs+=[0, a:opts.revision]
     endif
     let [hexlist, gitargs]=call(s:F.prepgitargs, pgaargs, {})
     if hexlist is 1
                 \'next': s:F.nextcs}
 endfunction
 let s:iterfuncs.changesets=s:iterfuncs.revrange
+let s:iterfuncs.ancestors=s:iterfuncs.revrange
 "▶1 Register driver
 call s:_f.regdriver('Git', s:git)
 "▶1