Always pass commit SHA to :Gbrowse handlers
This commit is contained in:
parent
bf04261080
commit
9ce67cdc93
@ -2215,6 +2215,9 @@ function! s:Browse(bang,line1,count,...) abort
|
|||||||
if type ==# 'tree' && !empty(path)
|
if type ==# 'tree' && !empty(path)
|
||||||
let path = s:sub(path, '/\=$', '/')
|
let path = s:sub(path, '/\=$', '/')
|
||||||
endif
|
endif
|
||||||
|
if empty(commit) && path !~# '^\.git/'
|
||||||
|
let commit = s:repo().rev_parse('HEAD')
|
||||||
|
endif
|
||||||
if path =~# '^\.git/.*HEAD' && filereadable(s:repo().dir(path[5:-1]))
|
if path =~# '^\.git/.*HEAD' && filereadable(s:repo().dir(path[5:-1]))
|
||||||
let body = readfile(s:repo().dir(path[5:-1]))[0]
|
let body = readfile(s:repo().dir(path[5:-1]))[0]
|
||||||
if body =~# '^\x\{40\}$'
|
if body =~# '^\x\{40\}$'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user