1. ZyX_I
  2. aurum


ZyX_I  committed e9f0735

@%aurum/commit: Fixed error in case getrrf returns files=0 and :AuC all was used
tests: Improved git tests

  • Participants
  • Parent commits e764c0b
  • Branches default

Comments (0)

Files changed (4)

File autoload/aurum/commit.vim

View file
  • Ignore whitespace
 "▶1 commfunc
 function s:cmd.function(opts, ...)
     let rrfopts=copy(a:opts)
-    if a:0 && index(a:000, 'all')==-1
+    let hasall=index(a:000, 'all')!=-1
+    if a:0 && !hasall
         let rrfopts.files=a:000
     let [repo, rev, files]=s:_r.cmdutils.getrrf(rrfopts,
     let status=repo.functions.status(repo)
     "▶2 Get file list
     let types=['modified', 'added', 'removed']
-    if a:0 && index(a:000, 'all')!=-1
+    if hasall
+        unlet files
         let files=[]
     elseif a:0
         if has_key(a:opts, 'type')

File test/addEmessages.vim

View file
  • Ignore whitespace
+redir => s:messages
+redir END
+let s:meslines=filter(split(s:messages, "\n")[1:], 'v:val=~#"\\v^E\\d+\\:"')
+if !empty(s:meslines)
+    call WriteFile(['>>> Error Messages:']+
+                \  s:meslines+
+                \  ['<<< Error Messages^'])

File test/drivers-git.in

View file
  • Ignore whitespace
 :let g:curtest='gittest'
 :let g:tipname='HEAD'
-:W{{{1 Annotate
-:Run! AuAnnotate file ./gittestrepo/* | wincmd w
 :W{{{1 Branch
 :AuBranch next3 repo ./gittestrepo/
 Added second line to newfile.vim
 // It was not required really:write
 :WT! 1delete _
+:W{{{1 File :
+:Run AuFile : *
+:W{{{1 File HEAD
+:Run AuFile HEAD newfile.vim
+:W{{{1 File HEAD^
+:Run AuFile HEAD^ newfile.vim
+:W{{{1 Annotate newfile.vim
+:R AuAnnotate file newfile.vim | wincmd p | call WriteFile(map(getline(1, '$'), 'v:val[stridx(v:val, " "):]'))
+:W{{{1 Diff changes
+:Run AuDiff changes HEAD^^^^
+:W{{{1 Diff rev2
+:Run AuDiff rev2 HEAD^^^^^
+:W{{{1 Diff rev1+rev2
+:Run AuDiff rev1 HEAD^^^^^ rev2 HEAD^^^^
 :W{{{1 Update
 :AuUpdate HEAD^ ./gittestrepo/
 :WT 1delete _
 :W{{{1 Update: force
+:R e newfile.vim
+:AuFile next replace
-:AuUpdate! HEAD^^ ./gittestrepo/
+:AuUpdate! HEAD^^
 :W{{{1 Update: branch
-:AuUpdate next ./gittestrepo/
+:AuUpdate next
 :WT 1delete _
 :W{{{1 Move
 :AuMove ./gittestrepo/--force ./gittestrepo/-f
 :AuCommit message Moved\ --force\ to\ -f repo ./gittestrepo/ all
 :Run! AuGrep W ignorecase repo ./gittestrepo/ | cwindow
 :W{{{1 Grep: HEAD^^^^
-:let repo=aurum#repository()
+:R let g:repo=aurum#repository()
 :let cs=repo.functions.getcs(repo, 'HEAD^^^^')
-:AuGrep W revision HEAD^^^^ repo ./gittestrepo/ | cwindow
+:AuGrep W revision HEAD^^^^ repo ./gittestrepo | cwindow
 :call WriteFile(map(getline(1, '$'), 'substitute(v:val, "'.cs.hex.'", "HEAD^^^^", "g")'))
 :W{{{1 Junk: ignore, ignoreglob
 :AuOther! pull : gittestbranchedrepo gitteststatusrepo
 :Run! AuLog gitteststatusrepo
+:source addEmessages.vim

File test/drivers-git.ok

  • Ignore whitespace
Binary file modified.