Commits

ZyX_I committed 066492b Merge

@aurum/drivers/git: Made git driver force git to sort changesets, thus not forcing Vim to do this

Comments (0)

Files changed (2)

plugin/aurum/drivers/git.vim

 " author email
 " 1-indented commit message
 let s:logformat='%h-%H-%P-%at%n%an%n%ae%n%d%n%w(0,1,1)%B'
-let s:logkwargs={'format': s:logformat, 'encoding': 'utf-8'}
+let s:logkwargs={'format': s:logformat, 'encoding': 'utf-8', 'date-order': 1}
 function s:F.parsecs(csdata, lstart)
     let line=a:lstart
     let cs={'branch': 'default'}
         let [cs, i]=s:F.parsecs(log, i)
         let a:repo.changesets[cs.hex]=extend(get(a:repo.changesets, cs.hex, {}),
                     \                        cs)
-        let cslist+=[a:repo.changesets[cs.hex]]
+        call insert(cslist, a:repo.changesets[cs.hex])
     endwhile
     "▲2
     return cslist
     let repo={'path': a:path, 'changesets': {}, 'cslist': [],
                 \'local': (stridx(a:path, '://')==-1),
                 \'labeltypes': ['tag', 'branch'],
-                \'hasrevisions': 0}
+                \'hasrevisions': 0, 'requires_sort': 0}
     return repo
 endfunction
 "▶1 git.checkdir :: dir → Bool

plugin/aurum/log.vim

         let literfuncs=s:iterfuncs.hg
     endif
     "▶3 Initialize variables
-    let haslimit=has_key(a:opts, 'limit')
+    let haslimit=(has_key(a:opts, 'limit') && a:opts.limit)
     if haslimit
         let limit=a:opts.limit
     endif
     let csbuf=[]
     let reqprops=keys(a:opts.reqs)
     call filter(reqprops, 'index(a:repo.initprops, v:val)==-1')
+    let a:opts.skipchangesets={}
     "▶3 Initialize variables not required for reading
     if !a:read
         let specials={}
         let a:bvar.rectangles=rectangles
         let a:bvar.specials=specials
         let a:bvar.csstarts=csstarts
-        let a:opts.skipchangesets={}
         let didredraw=0
         let procinput=a:bvar.procinput
         let lastw0line=-1