Fix backport of @ to old Git

This commit is contained in:
Tim Pope
2018-09-12 12:32:43 -04:00
parent 144b73946e
commit af76267c6a

View File

@@ -645,7 +645,7 @@ function! fugitive#Route(object, ...) abort
endif
endif
if !exists('f')
let commit = substitute(matchstr(rev, '^[^:]\+\|^:.*'), '^@\%($|[^~]\)\@=', 'HEAD', '')
let commit = substitute(matchstr(rev, '^[^:]\+\|^:.*'), '^@\%($\|[~^]\|@{\)\@=', 'HEAD', '')
let file = substitute(matchstr(rev, '^[^:]\+\zs:.*'), '^:', '/', '')
if file =~# '^/\.\.\=\%(/\|$\)\|^//\|^/\a\+:'
let file = file =~# '^/\.' ? simplify(getcwd() . file) : file[1:-1]