From b81c59bd6adb2a1aac7d3865eb4ee0f6e51eb29c Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Tue, 10 May 2022 22:47:05 -0400 Subject: [PATCH] Remove fugitive#head() --- autoload/fugitive.vim | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 3ea0480..8cf3511 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -962,6 +962,10 @@ function! fugitive#Head(...) abort endif endfunction +function! fugitive#head(...) abort + throw 'Third party code is using fugitive#head() which has been removed. Change it to FugitiveHead()' +endfunction + function! fugitive#RevParse(rev, ...) abort let hash = s:ChompDefault('', [a:0 ? a:1 : s:Dir(), 'rev-parse', '--verify', a:rev, '--']) if hash =~# '^\x\{40,\}$' @@ -8018,14 +8022,6 @@ function! fugitive#statusline(...) abort return fugitive#Statusline() endfunction -function! fugitive#head(...) abort - if empty(s:Dir()) - return '' - endif - - return fugitive#Head(a:0 ? a:1 : 0) -endfunction - " Section: Folding function! fugitive#Foldtext() abort