diff --git a/autoload/sy/repo.vim b/autoload/sy/repo.vim index 957662a..c71b1f8 100644 --- a/autoload/sy/repo.vim +++ b/autoload/sy/repo.vim @@ -27,67 +27,67 @@ endfunction " Function: #get_diff_git {{{1 function! sy#repo#get_diff_git() abort - let diff = s:run(g:signify_vcs_cmds.git, b:sy_info.file, 1) + let diff = s:run(g:signify_vcs_cmds.git, b:sy_info.file) return v:shell_error ? [0, ''] : [1, diff] endfunction " Function: #get_diff_hg {{{1 function! sy#repo#get_diff_hg() abort - let diff = s:run(g:signify_vcs_cmds.hg, b:sy_info.path, 1) + let diff = s:run(g:signify_vcs_cmds.hg, b:sy_info.path) return v:shell_error ? [0, ''] : [1, diff] endfunction " Function: #get_diff_svn {{{1 function! sy#repo#get_diff_svn() abort - let diff = s:run(g:signify_vcs_cmds.svn, b:sy_info.path, 0) + let diff = s:run(g:signify_vcs_cmds.svn, b:sy_info.path) return v:shell_error ? [0, ''] : [1, diff] endfunction " Function: #get_diff_bzr {{{1 function! sy#repo#get_diff_bzr() abort - let diff = s:run(g:signify_vcs_cmds.bzr, b:sy_info.path, 0) + let diff = s:run(g:signify_vcs_cmds.bzr, b:sy_info.path) return (v:shell_error =~ '[012]') ? [1, diff] : [0, ''] endfunction " Function: #get_diff_darcs {{{1 function! sy#repo#get_diff_darcs() abort - let diff = s:run(g:signify_vcs_cmds.darcs, b:sy_info.path, 1) + let diff = s:run(g:signify_vcs_cmds.darcs, b:sy_info.path) return v:shell_error ? [0, ''] : [1, diff] endfunction " Function: #get_diff_fossil {{{1 function! sy#repo#get_diff_fossil() abort - let diff = s:run(g:signify_vcs_cmds.fossil, b:sy_info.path, 1) + let diff = s:run(g:signify_vcs_cmds.fossil, b:sy_info.path) return v:shell_error ? [0, ''] : [1, diff] endfunction " Function: #get_diff_cvs {{{1 function! sy#repo#get_diff_cvs() abort - let diff = s:run(g:signify_vcs_cmds.cvs, b:sy_info.file, 1) + let diff = s:run(g:signify_vcs_cmds.cvs, b:sy_info.file) return ((v:shell_error == 1) && (diff =~ '+++')) ? [1, diff] : [0, ''] endfunction " Function: #get_diff_rcs {{{1 function! sy#repo#get_diff_rcs() abort - let diff = s:run(g:signify_vcs_cmds.rcs, b:sy_info.path, 0) + let diff = s:run(g:signify_vcs_cmds.rcs, b:sy_info.path) return v:shell_error ? [0, ''] : [1, diff] endfunction " Function: #get_diff_accurev {{{1 function! sy#repo#get_diff_accurev() abort - let diff = s:run(g:signify_vcs_cmds.accurev, b:sy_info.file, 1) + let diff = s:run(g:signify_vcs_cmds.accurev, b:sy_info.file) return (v:shell_error >= 2) ? [0, ''] : [1, diff] endfunction " Function: #get_diff_perforce {{{1 function! sy#repo#get_diff_perforce() abort - let diff = s:run(g:signify_vcs_cmds.perforce, b:sy_info.path, 0) + let diff = s:run(g:signify_vcs_cmds.perforce, b:sy_info.path) return v:shell_error ? [0, ''] : [1, diff] endfunction " Function: #get_diff_tfs {{{1 function! sy#repo#get_diff_tfs() abort - let diff = s:run(g:signify_vcs_cmds.tfs, b:sy_info.file, 0) + let diff = s:run(g:signify_vcs_cmds.tfs, b:sy_info.file) return v:shell_error ? [0, ''] : [1, s:strip_context(diff)] endfunction @@ -108,17 +108,17 @@ function! sy#repo#debug_detection() endif let vcs_args = { - \ 'git': [g:signify_vcs_cmds.git, b:sy_info.file, 1], - \ 'hg': [g:signify_vcs_cmds.hg, b:sy_info.path, 1], - \ 'svn': [g:signify_vcs_cmds.svn, b:sy_info.path, 0], - \ 'darcs': [g:signify_vcs_cmds.darcs, b:sy_info.path, 1], - \ 'bzr': [g:signify_vcs_cmds.bzr, b:sy_info.path, 0], - \ 'fossil': [g:signify_vcs_cmds.fossil, b:sy_info.path, 1], - \ 'cvs': [g:signify_vcs_cmds.cvs, b:sy_info.file, 1], - \ 'rcs': [g:signify_vcs_cmds.rcs, b:sy_info.path, 0], - \ 'accurev': [g:signify_vcs_cmds.accurev, b:sy_info.file, 1], - \ 'perforce': [g:signify_vcs_cmds.perforce, b:sy_info.path, 0], - \ 'tfs': [g:signify_vcs_cmds.tfs, b:sy_info.file, 0], + \ 'git': [g:signify_vcs_cmds.git, b:sy_info.file], + \ 'hg': [g:signify_vcs_cmds.hg, b:sy_info.path], + \ 'svn': [g:signify_vcs_cmds.svn, b:sy_info.path], + \ 'darcs': [g:signify_vcs_cmds.darcs, b:sy_info.path], + \ 'bzr': [g:signify_vcs_cmds.bzr, b:sy_info.path], + \ 'fossil': [g:signify_vcs_cmds.fossil, b:sy_info.path], + \ 'cvs': [g:signify_vcs_cmds.cvs, b:sy_info.file], + \ 'rcs': [g:signify_vcs_cmds.rcs, b:sy_info.path], + \ 'accurev': [g:signify_vcs_cmds.accurev, b:sy_info.file], + \ 'perforce': [g:signify_vcs_cmds.perforce, b:sy_info.path], + \ 'tfs': [g:signify_vcs_cmds.tfs, b:sy_info.file], \ } for vcs in s:vcs_list @@ -150,7 +150,7 @@ function! s:expand_cmd(cmd, path) abort endfunction " Function: s:run {{{1 -function! s:run(cmd, path, do_switch_dir) +function! s:run(cmd, path) execute b:sy_info.chdir fnameescape(b:sy_info.dir) try let ret = system(s:expand_cmd(a:cmd, a:path))