Only diff against parent commit in Fugitive revision buffers

Fixes #695.
This commit is contained in:
Andy Stewart
2020-04-18 17:13:15 +01:00
parent 5f6048da13
commit 2b62481d38
3 changed files with 4 additions and 5 deletions

View File

@@ -120,7 +120,7 @@ function! gitgutter#diff#run_diff(bufnr, from, preserve_full_diff) abort
endif
" Write file from index to temporary file.
let index_name = g:gitgutter_diff_base.':'.gitgutter#utility#repo_path(a:bufnr, 1)
let index_name = gitgutter#utility#get_diff_base(a:bufnr).':'.gitgutter#utility#repo_path(a:bufnr, 1)
let cmd .= g:gitgutter_git_executable.' '.g:gitgutter_git_args.' --no-pager show '.index_name.' > '.from_file.' && '
elseif a:from ==# 'working_tree'