Enable diffing against the working tree.

Previously gitgutter could only diff the buffer against the index.  This
change enables diffing against the working tree, which will be useful
for stashing.
This commit is contained in:
Andy Stewart
2018-10-12 15:49:25 +01:00
parent af1e674155
commit 622193a625
3 changed files with 42 additions and 25 deletions

View File

@@ -41,7 +41,7 @@ function! gitgutter#process_buffer(bufnr, force) abort
let diff = ''
try
let diff = gitgutter#diff#run_diff(a:bufnr, 0)
let diff = gitgutter#diff#run_diff(a:bufnr, 'index', 0)
catch /gitgutter not tracked/
call gitgutter#debug#log('Not tracked: '.gitgutter#utility#file(a:bufnr))
catch /gitgutter diff failed/