Add --no-pager to git-show and git-diff.

I needed these to get output from the commands on Windows.
This commit is contained in:
Andy Stewart
2018-02-28 16:45:39 +00:00
parent c39a5c240a
commit 293b633d79

View File

@@ -74,14 +74,14 @@ function! gitgutter#diff#run_diff(bufnr, preserve_full_diff) abort
" Write file from index to temporary file.
let index_name = g:gitgutter_diff_base.':'.gitgutter#utility#repo_path(a:bufnr, 1)
let cmd .= g:gitgutter_git_executable.' show '.index_name.' > '.index_file.' && '
let cmd .= g:gitgutter_git_executable.' --no-pager show '.index_name.' > '.index_file.' && '
" Write buffer to temporary file.
" Note: this is synchronous.
call s:write_buffer(a:bufnr, buff_file)
" Call git-diff with the temporary files.
let cmd .= g:gitgutter_git_executable
let cmd .= g:gitgutter_git_executable.' --no-pager'
if s:c_flag
let cmd .= ' -c "diff.autorefreshindex=0"'
let cmd .= ' -c "diff.noprefix=false"'