Replace --format with --pretty=format for older Git

This commit is contained in:
Tim Pope
2020-01-20 11:54:49 -05:00
parent 708595d996
commit 8d4b85ed09

View File

@@ -1567,7 +1567,7 @@ function! s:ReplaceCmd(cmd) abort
endfunction endfunction
function! s:QueryLog(refspec) abort function! s:QueryLog(refspec) abort
let lines = s:LinesError(['log', '-n', '256', '--format=%h%x09%s', a:refspec, '--'])[0] let lines = s:LinesError(['log', '-n', '256', '--pretty=format:%h%x09%s', a:refspec, '--'])[0]
call map(lines, 'split(v:val, "\t")') call map(lines, 'split(v:val, "\t")')
call map(lines, '{"type": "Log", "commit": v:val[0], "subject": v:val[-1]}') call map(lines, '{"type": "Log", "commit": v:val[0], "subject": v:val[-1]}')
return lines return lines