diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 6c932db..7137666 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -564,9 +564,13 @@ function! s:TreeChomp(...) abort endfunction function! s:EchoExec(...) abort - echo call('s:ChompError', a:000)[0] - call fugitive#ReloadStatus(-1, 1) - return 'checktime' + if s:RunJobs() + return 'Git ' . s:fnameescape(a:000) + else + echo call('s:ChompError', a:000)[0] + call fugitive#ReloadStatus(-1, 1) + return 'checktime' + endif endfunction let s:head_cache = {} @@ -5952,18 +5956,18 @@ function! fugitive#MapJumps(...) abort nnoremap cz :Git stash nnoremap cz :Git stash - nnoremap cza :exe EchoExec(['stash', 'apply', '--quiet', '--index', 'stash@{' . v:count . '}']) - nnoremap czA :exe EchoExec(['stash', 'apply', '--quiet', 'stash@{' . v:count . '}']) - nnoremap czp :exe EchoExec(['stash', 'pop', '--quiet', '--index', 'stash@{' . v:count . '}']) - nnoremap czP :exe EchoExec(['stash', 'pop', '--quiet', 'stash@{' . v:count . '}']) + nnoremap cza :Git stash apply --quiet --index stash@{=v:count} + nnoremap czA :Git stash apply --quiet stash@{=v:count} + nnoremap czp :Git stash pop --quiet --index stash@{=v:count} + nnoremap czP :Git stash pop --quiet stash@{=v:count} nnoremap czv :exe 'Gedit' fugitive#RevParse('stash@{' . v:count . '}') - nnoremap czw :exe EchoExec(['stash', '--keep-index'] + (v:count > 1 ? ['--all'] : v:count ? ['--include-untracked'] : [])) - nnoremap czz :exe EchoExec(['stash'] + (v:count > 1 ? ['--all'] : v:count ? ['--include-untracked'] : [])) + nnoremap czw :Git stash --keep-index=v:count > 1 ? ' --all' : v:count ? ' --include-untracked' : '' + nnoremap czz :Git stash =v:count > 1 ? ' --all' : v:count ? ' --include-untracked' : '' nnoremap cz? :help fugitive_cz nnoremap co :Git checkout nnoremap co :Git checkout - nnoremap coo :exe EchoExec(['checkout'] + split(SquashArgument()) + ['--']) + nnoremap coo :Git checkout =SquashArgument() -- nnoremap co? :help fugitive_co nnoremap cb :Git branch