mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-12 21:33:53 -05:00
Cleaner :Git commands
This commit is contained in:
@@ -634,18 +634,18 @@ function! s:ExecuteInTree(cmd) abort
|
|||||||
endtry
|
endtry
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:Git(bang,cmd) abort
|
function! s:Git(bang, args) abort
|
||||||
if a:bang
|
if a:bang
|
||||||
return s:Edit('edit',1,a:cmd)
|
return s:Edit('edit', 1, a:args)
|
||||||
endif
|
endif
|
||||||
let git = s:repo().git_command()
|
let git = g:fugitive_git_executable
|
||||||
if has('gui_running') && !has('win32')
|
if has('gui_running') && !has('win32')
|
||||||
let git .= ' --no-pager'
|
let git .= ' --no-pager'
|
||||||
endif
|
endif
|
||||||
let cmd = matchstr(a:cmd,'\v\C.{-}%($|\\@<!%(\\\\)*\|)@=')
|
let args = matchstr(a:args,'\v\C.{-}%($|\\@<!%(\\\\)*\|)@=')
|
||||||
call s:ExecuteInTree('!'.git.' '.cmd)
|
call s:ExecuteInTree('!'.git.' '.args)
|
||||||
call fugitive#reload_status()
|
call fugitive#reload_status()
|
||||||
return matchstr(a:cmd,'\v\C\\@<!%(\\\\)*\|\zs.*')
|
return matchstr(a:args, '\v\C\\@<!%(\\\\)*\|\zs.*')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:GitComplete(A,L,P) abort
|
function! s:GitComplete(A,L,P) abort
|
||||||
|
|||||||
Reference in New Issue
Block a user