mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-14 22:33:51 -05:00
:Gwrite! calls git add --force
This commit is contained in:
@@ -948,7 +948,11 @@ function! s:Write(force,...) abort
|
||||
execute 'write! '.s:fnameescape(s:repo().translate(path))
|
||||
endif
|
||||
|
||||
if a:force
|
||||
let error = s:repo().git_chomp_in_tree('add', '--force', file)
|
||||
else
|
||||
let error = s:repo().git_chomp_in_tree('add', file)
|
||||
endif
|
||||
if v:shell_error
|
||||
let v:errmsg = 'fugitive: '.error
|
||||
return 'echoerr v:errmsg'
|
||||
|
||||
Reference in New Issue
Block a user