Support files with a leading -

Git treats anything past the `--` as filenames.
This commit is contained in:
John Kurkowski
2018-05-05 23:05:31 -07:00
parent 22c3fc0bf5
commit f363799550

View File

@@ -114,7 +114,7 @@ function! gitgutter#utility#set_repo_path(bufnr) abort
" * -2 - not tracked by git
call gitgutter#utility#setbufvar(a:bufnr, 'path', -1)
let cmd = gitgutter#utility#cd_cmd(a:bufnr, g:gitgutter_git_executable.' ls-files --error-unmatch --full-name '.gitgutter#utility#shellescape(s:filename(a:bufnr)))
let cmd = gitgutter#utility#cd_cmd(a:bufnr, g:gitgutter_git_executable.' ls-files --error-unmatch --full-name -- '.gitgutter#utility#shellescape(s:filename(a:bufnr)))
if g:gitgutter_async && gitgutter#async#available()
if has('lambda')