mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-14 06:13: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
|
||||
if !exists('f')
|
||||
let commit = substitute(matchstr(rev,'^[^:]\+\|^:.*'), '^@\%($|[^~]\)\@=', 'HEAD', '')
|
||||
let file = substitute(matchstr(rev, '^[^:]\+:.*'), '^:', '/', '')
|
||||
let file = substitute(matchstr(rev, '^[^:]\+\zs:.*'), '^:', '/', '')
|
||||
if commit !~# '^[0-9a-f]\{40\}$'
|
||||
let commit = system(fugitive#Prepare(dir, 'rev-parse', '--verify', commit))[0:-2]
|
||||
let commit = v:shell_error ? '' : commit
|
||||
|
||||
Reference in New Issue
Block a user