From f363799550bfd9ff08a1a14456024dbc982944e3 Mon Sep 17 00:00:00 2001 From: John Kurkowski Date: Sat, 5 May 2018 23:05:31 -0700 Subject: [PATCH] Support files with a leading `-` Git treats anything past the `--` as filenames. --- autoload/gitgutter/utility.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/gitgutter/utility.vim b/autoload/gitgutter/utility.vim index 5f4d815..d497938 100644 --- a/autoload/gitgutter/utility.vim +++ b/autoload/gitgutter/utility.vim @@ -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')