Rename FugitiveFilename() to FugitivePath()
This commit is contained in:
parent
2a817bb53a
commit
1988518904
@ -435,7 +435,7 @@ function! s:DirCommitFile(path) abort
|
|||||||
return [vals[1], (vals[2] =~# '^.$' ? ':' : '') . vals[2], vals[3]]
|
return [vals[1], (vals[2] =~# '^.$' ? ':' : '') . vals[2], vals[3]]
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! fugitive#Filename(url) abort
|
function! fugitive#Path(url) abort
|
||||||
let [dir, commit, file] = s:DirCommitFile(a:url)
|
let [dir, commit, file] = s:DirCommitFile(a:url)
|
||||||
if len(dir)
|
if len(dir)
|
||||||
return s:PlatformSlash(FugitiveTreeForGitDir(dir) . file)
|
return s:PlatformSlash(FugitiveTreeForGitDir(dir) . file)
|
||||||
|
@ -138,10 +138,10 @@ function! FugitiveHead(...) abort
|
|||||||
return fugitive#repo().head(a:0 ? a:1 : 0)
|
return fugitive#repo().head(a:0 ? a:1 : 0)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! FugitiveFilename(...) abort
|
function! FugitivePath(...) abort
|
||||||
let file = fnamemodify(a:0 ? a:1 : @%, ':p')
|
let file = fnamemodify(a:0 ? a:1 : @%, ':p')
|
||||||
if file =~? '^fugitive:'
|
if file =~? '^fugitive:'
|
||||||
return fugitive#Filename(file)
|
return fugitive#Path(file)
|
||||||
else
|
else
|
||||||
return file
|
return file
|
||||||
endif
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user