aurum / test / drivers-git.in

:let g:curtest='gittest'
:let g:tipname='HEAD'
:W{{{1 Branch
:AuBranch next3 repo ./gittestrepo/
:WT
:W{{{1 Log: nomerges
:Run! AuLog ./gittestrepo/ nomerges
:bwipeout!
:W{{{1 Log: files
:Run! AuLog ./gittestrepo/ showfiles
:bwipeout!
:W{{{1 Log: everything
:Run! AuLog ./gittestrepo/ stat patch showfiles showrenames showcopies
:bwipeout!
:W{{{1 Status: current
:Run! AuStatus ./gitteststatusrepo/
:bwipeout!
:W{{{1 Status: relative to other (1)
:Run! AuStatus ./gitteststatusrepo/ rev HEAD^
:bwipeout!
:W{{{1 Status: relative to other (2)
:Run! AuStatus ./gitteststatusrepo/ wdrev HEAD^
:bwipeout!
:W{{{1 Status: between two revisions
:Run! AuStatus ./gittestrepo/ rev erevision wdrev next
:bwipeout!
:W{{{1 Branch override fail
:Try AuBranch next repo ./gittestrepo/
:WT
:W{{{1 Branch override
:AuBranch! next repo ./gittestrepo/
:WT
:W{{{1 Name: create tag
:AuName this_is_a_tag type tag repo ./gittestrepo/
:WT
:W{{{1 Name: override tag fail
:Try AuName this_is_a_tag type tag repo ./gittestrepo/ HEAD^^
:WT
:W{{{1 Name: override tag
:AuName! this_is_a_tag type tag repo ./gittestrepo/ HEAD^^
:Run! AuLog ./gittestrepo/ style compact
:bwipeout!
:W{{{1 Name: delete tag
:AuName this_is_a_tag type tag repo ./gittestrepo/ delete
:Run! AuLog ./gittestrepo/ style compact
:bwipeout!
:W{{{1 Name: create branch
:AuName new_branch type branch repo ./gittestrepo/
:WT
:W{{{1 Name: override branch fail
:Try AuName new_branch type branch repo ./gittestrepo/ HEAD^^
:Run! AuLog ./gittestrepo/ style compact
:bwipeout!
:W{{{1 Name: override branch
:Try AuName! new_branch type branch repo ./gittestrepo/ HEAD^^
:Run! AuLog ./gittestrepo/ style compact
:bwipeout!
:W{{{1 Name: delete branch
:AuName new_branch type branch repo ./gittestrepo/ delete
:Run! AuLog ./gittestrepo/ style compact
:bwipeout!
:W{{{1 Commit
:edit ./gittestrepo/newfile.vim
iW In file newfile.vim:write
:Run! AuCommit message Added\ newfile.vim date 1990-10-11 user ZyX\ <zyx@example.by> type unknown ./gittestrepo/newfile.vim
:WT! 1delete _
:W{{{1 Commit 2
oW File newfile.vim, second line:write
:Run! AuCommit date 1990-10-12 user ZyX\ <zyx@example.by>
Added second line to newfile.vim
// It was not required really:write
:WT! 1delete _
:bwipeout!
:W{{{1 File :
:Run AuFile : *
:bwipeout!
:W{{{1 File HEAD
:Run AuFile HEAD newfile.vim
:bwipeout!
:W{{{1 File HEAD^
:Run AuFile HEAD^ newfile.vim
:bwipeout!
:W{{{1 Annotate newfile.vim
:R AuAnnotate file newfile.vim | wincmd p | call WriteFile(map(getline(1, '$'), 'v:val[stridx(v:val, " "):]'))
:bwipeout!
:bwipeout!
:W{{{1 Diff changes
:Run AuDiff changes HEAD^^^^
:bwipeout!
:W{{{1 Diff rev2
:Run AuDiff rev2 HEAD^^^^^
:bwipeout!
:W{{{1 Diff rev1+rev2
:Run AuDiff rev1 HEAD^^^^^ rev2 HEAD^^^^
:bwipeout!
:W{{{1 Update
:AuUpdate HEAD^ ./gittestrepo/
:WT 1delete _
:W{{{1 Update: force
:R e newfile.vim
:AuFile next replace
:write!
:AuUpdate! HEAD^^
:WT
:W{{{1 Update: branch
:AuUpdate next
:WT 1delete _
:bwipeout!
:W{{{1 Move
:AuMove ./gittestrepo/--force ./gittestrepo/-f
:AuCommit message Moved\ --force\ to\ -f repo ./gittestrepo/ all
:AuLog ./gittestrepo/ noautoaddlog showrenames showcopies limit 1
:set modifiable noreadonly
:1delete _
:/Commited/delete _
:Run! echo
:bwipeout!
:W{{{1 Move: copy
:AuMove copy ./gittestrepo/-f ./gittestrepo/--force
:AuCommit message Copied\ -f\ to\ --force repo ./gittestrepo/ all
:AuLog ./gittestrepo/ noautoaddlog showrenames showcopies limit 1
:set modifiable noreadonly
:1delete _
:/Commited/delete _
:Run! echo
:bwipeout!
:W{{{1 Junk: forget, remove
:call WriteFile(filereadable('./gittestrepo/-f').filereadable('./gittestrepo/--force'))
:AuJunk forget ./gittestrepo/-f
:AuJunk remove ./gittestrepo/--force
:call WriteFile(filereadable('./gittestrepo/-f').filereadable('./gittestrepo/--force'))
:AuCommit ./gittestrepo/**
ggddGld:write
:WT 1delete _
:W{{{1 Grep: working directory
:Run! AuGrep W repo ./gittestrepo/ | cwindow
:cclose
:W{{{1 Grep: working directory, ignore case
:Run! AuGrep W ignorecase repo ./gittestrepo/ | cwindow
:cclose
:W{{{1 Grep: HEAD^^^^
:R let g:repo=aurum#repository()
:let cs=repo.functions.getcs(repo, 'HEAD^^^^')
:AuGrep W revision HEAD^^^^ repo ./gittestrepo | cwindow
:call WriteFile(map(getline(1, '$'), 'substitute(v:val, "'.cs.hex.'", "HEAD^^^^", "g")'))
:cclose
:W{{{1 Junk: ignore, ignoreglob
:write! ./gittestrepo/file.vim
:write! ./gittestrepo/subdir/file.vim
:write! ./gittestrepo/ignoredfile.vim
:W{{{2 Status before junk
:Run! AuStatus ./gittestrepo/ show all
:AuJunk ignore ./gittestrepo/file.vim
:AuJunk ignoreglob ./gittestrepo/ignored*
:W{{{2 Status after junk
:Run! AuStatus ./gittestrepo/ show all
:bwipeout
:W{{{2 gitignore contents
:call WriteFile(readfile('./gittestrepo/.gitignore', 'b'))
:bwipeout
:W{{{1 Other: push, pull
:command -nargs=1 FFE try | <args> | catch /^Frawor:autoload\/aurum\/drivers\/git:ppf:/ | if stridx(v:exception, "git pull")!=-1 && stridx(v:exception, 'fast-forward')!=-1 | call WriteFile('Fast forward failed') | endif | endtry
:W{{{2 push
:AuOther push C drivers-git-A gittestbranchedrepo
:Run! AuLog drivers-git-A
:bwipeout
:W{{{2 pull
:FFE AuOther pull D gittestbranchedrepo drivers-git-A
:AuUpdate FETCH_HEAD drivers-git-A
:Run! AuLog drivers-git-A
:bwipeout
:W{{{2 forced push
:AuOther! push A gitteststatusrepo drivers-git-A
:Run! AuLog gitteststatusrepo
:bwipeout
:W{{{2 forced pull
:FFE AuOther! pull : gittestbranchedrepo gitteststatusrepo
:Run! AuLog gitteststatusrepo
:bwipeout
:source addEmessages.vim
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.