Explicitly tell git to diff outside any repo.

Closes #541.
This commit is contained in:
Andy Stewart
2018-07-27 12:49:14 +01:00
parent 6076c96786
commit b4e43ae9e7

View File

@@ -100,7 +100,7 @@ function! gitgutter#diff#run_diff(bufnr, preserve_full_diff) abort
call s:write_buffer(a:bufnr, buff_file)
" Call git-diff with the temporary files.
let cmd .= g:gitgutter_git_executable.' --no-pager'
let cmd .= g:gitgutter_git_executable.' --git-dir="" --no-pager'
if s:c_flag
let cmd .= ' -c "diff.autorefreshindex=0"'
let cmd .= ' -c "diff.noprefix=false"'