1. ZyX_I
  2. aurum


ZyX_I  committed 066492b Merge

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

  • Participants
  • Parent commits 2de1c67, e2c73ce
  • Branches default

Comments (0)

Files changed (2)

File plugin/aurum/drivers/git.vim

View file
 " 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])
     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
 "▶1 git.checkdir :: dir → Bool

File plugin/aurum/log.vim

View file
         let literfuncs=s:iterfuncs.hg
     "▶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
     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