Skip to content

Commit

Permalink
Handle status diff file arguments more rigorously
Browse files Browse the repository at this point in the history
  • Loading branch information
tpope committed Sep 18, 2023
1 parent b9cf6ad commit 99db68d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autoload/fugitive.vim
Original file line number Diff line number Diff line change
Expand Up @@ -2795,7 +2795,7 @@ function! fugitive#BufReadStatus(cmdbang) abort
let diff['Staged'] = fugitive#Execute(diff_cmd + ['--cached'], function('len'))
endif
if len(unstaged)
let diff['Unstaged'] = fugitive#Execute(diff_cmd + map(copy(unstaged), 'v:val.relative[0]'), function('len'))
let diff['Unstaged'] = fugitive#Execute(diff_cmd + ['--'] + map(copy(unstaged), 'tree . "/" . v:val.relative[0]'), function('len'))
endif

for dict in staged
Expand Down

0 comments on commit 99db68d

Please sign in to comment.