Use rev-list in lieu of log with raw format

This commit is contained in:
Tim Pope 2019-08-13 17:24:12 -04:00
parent f33a53bceb
commit 49b777ae44

View File

@ -4596,7 +4596,7 @@ function! s:BlameCommitFileLnum(...) abort
if commit =~# '^0\+$'
let commit = ''
elseif line !~# '^\^' && has_key(state, 'blame_reverse_end')
let commit = get(s:LinesError('log', '--pretty=format:%H', '--ancestry-path', '--reverse', commit . '..' . state.blame_reverse_end)[0], 0, commit)
let commit = get(s:LinesError('rev-list', '--ancestry-path', '--reverse', commit . '..' . state.blame_reverse_end)[0], 0, commit)
endif
let lnum = +matchstr(line, ' \zs\d\+\ze \%((\| *\d\+)\)')
let path = matchstr(line, '^\^\=\x* \+\%(\d\+ \+\d\+ \+\)\=\zs.\{-\}\ze\s\+\%(\%( \d\+ \)\@<!([^()]*\w \d\+)\|\d\+ \)')