Support X on newly added file

Closes https://github.com/tpope/vim-fugitive/issues/1212
This commit is contained in:
Tim Pope
2019-02-20 23:47:46 -05:00
parent 654f7f5432
commit 74aefa53ac

View File

@@ -2436,6 +2436,8 @@ function! s:StageDelete(lnum, count) abort
endtry endtry
elseif info.status ==# 'U' elseif info.status ==# 'U'
call s:TreeChomp('rm', '--', info.paths[0]) call s:TreeChomp('rm', '--', info.paths[0])
elseif info.status ==# 'A'
call s:TreeChomp('rm', '-f', '--', info.paths[0])
elseif info.status ==# '?' elseif info.status ==# '?'
call s:TreeChomp('clean', '-f', '--', info.paths[0]) call s:TreeChomp('clean', '-f', '--', info.paths[0])
elseif info.section ==# 'Unstaged' elseif info.section ==# 'Unstaged'