mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-09 03:53:47 -05:00
@@ -180,9 +180,17 @@ endfunction
|
|||||||
" - it ignores unsaved changes in buffers
|
" - it ignores unsaved changes in buffers
|
||||||
" - it does not change to the repo root
|
" - it does not change to the repo root
|
||||||
function! gitgutter#quickfix()
|
function! gitgutter#quickfix()
|
||||||
|
let cmd = g:gitgutter_git_executable.' '.g:gitgutter_git_args.' rev-parse --show-cdup'
|
||||||
|
let path_to_repo = get(systemlist(cmd), 0, '')
|
||||||
|
if !empty(path_to_repo) && path_to_repo[-1:] != '/'
|
||||||
|
let path_to_repo .= '/'
|
||||||
|
endif
|
||||||
|
|
||||||
let locations = []
|
let locations = []
|
||||||
let cmd = g:gitgutter_git_executable.' '.g:gitgutter_git_args.' --no-pager'.
|
let cmd = g:gitgutter_git_executable.' '.g:gitgutter_git_args.' --no-pager'.
|
||||||
\ ' diff --no-ext-diff --no-color -U0 '.g:gitgutter_diff_args. ' '. g:gitgutter_diff_base
|
\ ' diff --no-ext-diff --no-color -U0'.
|
||||||
|
\ ' --src-prefix=a/'.path_to_repo.' --dst-prefix=b/'.path_to_repo.' '.
|
||||||
|
\ g:gitgutter_diff_args. ' '. g:gitgutter_diff_base
|
||||||
let diff = systemlist(cmd)
|
let diff = systemlist(cmd)
|
||||||
let lnum = 0
|
let lnum = 0
|
||||||
for line in diff
|
for line in diff
|
||||||
|
|||||||
Reference in New Issue
Block a user