mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-14 14:23:51 -05:00
Fix issue generating Fugitive URLs
This commit is contained in:
@@ -343,7 +343,7 @@ function! s:repo_translate(spec, ...) dict abort
|
|||||||
endif
|
endif
|
||||||
if !exists('f')
|
if !exists('f')
|
||||||
let commit = substitute(matchstr(rev,'^[^:]\+\|^:.*'), '^@\%($|[^~]\)\@=', 'HEAD', '')
|
let commit = substitute(matchstr(rev,'^[^:]\+\|^:.*'), '^@\%($|[^~]\)\@=', 'HEAD', '')
|
||||||
let file = substitute(matchstr(rev, '^[^:]\+:.*'), '^:', '/', '')
|
let file = substitute(matchstr(rev, '^[^:]\+\zs:.*'), '^:', '/', '')
|
||||||
if commit !~# '^[0-9a-f]\{40\}$'
|
if commit !~# '^[0-9a-f]\{40\}$'
|
||||||
let commit = system(fugitive#Prepare(dir, 'rev-parse', '--verify', commit))[0:-2]
|
let commit = system(fugitive#Prepare(dir, 'rev-parse', '--verify', commit))[0:-2]
|
||||||
let commit = v:shell_error ? '' : commit
|
let commit = v:shell_error ? '' : commit
|
||||||
|
|||||||
Reference in New Issue
Block a user