From b411b753f805b969cca856e2ae51fdbab49880df Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Wed, 17 Aug 2022 09:21:45 -0400 Subject: [PATCH] Add deprecation warning on editing .git/index --- plugin/fugitive.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index c17d850..45bfc6d 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -689,6 +689,9 @@ augroup fugitive \ if FugitiveIsGitDir(expand(':p:h')) | \ let b:git_dir = s:Slash(expand(':p:h')) | \ exe fugitive#BufReadStatus(v:cmdbang) | + \ echohl WarningMSG | + \ echo "fugitive: Direct editing of .git/" . expand('%:t') . " is deprecated" | + \ echohl NONE | \ elseif filereadable(expand('')) | \ silent doautocmd BufReadPre | \ keepalt noautocmd read |