mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-10 12:33:46 -05:00
Add deprecation warning on editing .git/index
This commit is contained in:
@@ -689,6 +689,9 @@ augroup fugitive
|
|||||||
\ if FugitiveIsGitDir(expand('<amatch>:p:h')) |
|
\ if FugitiveIsGitDir(expand('<amatch>:p:h')) |
|
||||||
\ let b:git_dir = s:Slash(expand('<amatch>:p:h')) |
|
\ let b:git_dir = s:Slash(expand('<amatch>:p:h')) |
|
||||||
\ exe fugitive#BufReadStatus(v:cmdbang) |
|
\ exe fugitive#BufReadStatus(v:cmdbang) |
|
||||||
|
\ echohl WarningMSG |
|
||||||
|
\ echo "fugitive: Direct editing of .git/" . expand('%:t') . " is deprecated" |
|
||||||
|
\ echohl NONE |
|
||||||
\ elseif filereadable(expand('<amatch>')) |
|
\ elseif filereadable(expand('<amatch>')) |
|
||||||
\ silent doautocmd BufReadPre |
|
\ silent doautocmd BufReadPre |
|
||||||
\ keepalt noautocmd read <amatch> |
|
\ keepalt noautocmd read <amatch> |
|
||||||
|
|||||||
Reference in New Issue
Block a user