Call git clean for U on untracked file

This commit is contained in:
Tim Pope 2016-03-09 21:26:09 -05:00
parent 099d65826e
commit 90250785d1

View File

@ -863,7 +863,7 @@ function! s:StageUndo() abort
let hash = repo.git_chomp('hash-object', '-w', filename) let hash = repo.git_chomp('hash-object', '-w', filename)
if !empty(hash) if !empty(hash)
if section ==# 'untracked' if section ==# 'untracked'
call delete(s:repo().tree(filename)) call repo.git_chomp_in_tree('clean', '--', filename)
elseif section ==# 'unstaged' elseif section ==# 'unstaged'
call repo.git_chomp_in_tree('checkout', '--', filename) call repo.git_chomp_in_tree('checkout', '--', filename)
else else