mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-12 21:33:53 -05:00
Automatically mkdir when editing .git/info/exclude
This commit is contained in:
@@ -3807,6 +3807,15 @@ function! s:StageIgnore(lnum1, lnum2, count) abort
|
||||
call extend(paths, info.relative)
|
||||
endfor
|
||||
call map(paths, '"/" . v:val')
|
||||
if !a:0
|
||||
let dir = fugitive#Find('.git/info/')
|
||||
if !isdirectory(dir)
|
||||
try
|
||||
call mkdir(dir)
|
||||
catch
|
||||
endtry
|
||||
endif
|
||||
endif
|
||||
exe 'Gsplit' (a:count ? '.gitignore' : '.git/info/exclude')
|
||||
let last = line('$')
|
||||
if last == 1 && empty(getline(1))
|
||||
|
||||
Reference in New Issue
Block a user