Commits

ZyX_I committed da33c7c

@aurum/drivers/git: Fixed typo in rf-annotate(), fixed rf-getcs() handling of revisions without parents
@aurum/annotate: Made it support non-numeric revisions

Comments (0)

Files changed (4)

plugin/aurum/annotate.vim

             let description.=repeat(' ', 31-descwidth)
         endif
         let user=substitute(a:cs.user, '\m\s*<[^>]\+>$', '', '')
-        let self[a:cs.hex]=printf('%*u %s / %s', a:numlen, a:cs.rev,
+        let self[a:cs.hex]=printf('%*s %s / %s', a:numlen, a:cs.rev,
                     \                            description, user)
     endif
     return self[a:cs.hex]

plugin/aurum/drivers/git.vim

 let s:git.revrange=s:git.getchangesets
 "▶1 git.getcs :: repo, rev → cs
 function s:git.getcs(repo, rev)
-    let cs=s:F.parsecs(s:F.git(a:repo, 'log', [a:rev.'^..'.a:rev], s:logkwargs,
+    let cs=s:F.parsecs(s:F.git(a:repo, 'log', ['-n1', a:rev], s:logkwargs,
                 \              0, 'csf', a:rev),
                 \      0)[0]
     " XXX This construct is used to preserve information like “allfiles” etc
         if !empty(lines) && lines[0][:8] is# 'filename '
             let filename=s:F.refile(remove(lines, 0)[9:])
         endif
-        let r+=[[filename, line[:39], str2nr(line[41:]])]
+        let r+=[[filename, line[:39], str2nr(line[41:])]]
     endwhile
     return r
 endfunction
 :W{{{1 Status: between two revisions
 :Run! AuStatus ./gittestrepo/ rev1 erevision rev2 next
 :bwipeout!
+:W{{{1 Annotate
+:Run! AuAnnotate file ./gittestrepo/* | wincmd w
Binary file modified.