1. nick brown
  2. aurum


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

  • Participants
  • Parent commits b4f47d0
  • Branches default

Comments (0)

Files changed (4)

File plugin/aurum/annotate.vim

View file
             let description.=repeat(' ', 31-descwidth)
         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)
     return self[a:cs.hex]

File plugin/aurum/drivers/git.vim

View file
 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:])
-        let r+=[[filename, line[:39], str2nr(line[41:]])]
+        let r+=[[filename, line[:39], str2nr(line[41:])]]
     return r

File test/git.in

View file
 :W{{{1 Status: between two revisions
 :Run! AuStatus ./gittestrepo/ rev1 erevision rev2 next
+:W{{{1 Annotate
+:Run! AuAnnotate file ./gittestrepo/* | wincmd w

File test/git.ok

Binary file modified.