commit 38c69cfebcd9e5614c2abb2bd2d79be453ceddaf (tree)
parent 70a36ceef89933ac7a2800b236ccb4bf19f111ed
Author: Tim Pope <code@tpope.net>
Date: Mon, 25 Jun 2018 16:43:00 -0400
Rename blob() to relative()
On second thought, we should exclude .git/ files from blob, so pick a
different name for now.
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim
@@ -538,7 +538,7 @@ function! s:cpath(path) abort
endif
endfunction
-function! s:buffer_blob(...) dict abort
+function! s:buffer_relative(...) dict abort
let rev = matchstr(self.spec(),'^fugitive:\%(//\)\=.\{-\}\%(//\|::\)\zs.*')
if rev != ''
let rev = s:sub(rev,'\w*','')
@@ -630,8 +630,8 @@ function! s:buffer_up(...) dict abort
return rev
endfunction
-call s:add_methods('buffer',['getvar','setvar','getline','repo','type','spec','name','commit','blob','rev','sha1','expand','containing_commit','up'])
-let s:buffer_prototype.path = s:function('s:buffer_blob')
+call s:add_methods('buffer',['getvar','setvar','getline','repo','type','spec','name','commit','relative','rev','sha1','expand','containing_commit','up'])
+let s:buffer_prototype.path = s:function('s:buffer_relative')
" Section: Git