mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-17 07:43:44 -05:00
Partially support :Git difftool on old Git
This commit is contained in:
@@ -3841,7 +3841,11 @@ function! s:ToolStream(line1, line2, range, bang, mods, options, args, state) ab
|
|||||||
let a:state.mode = 'init'
|
let a:state.mode = 'init'
|
||||||
let a:state.from = ''
|
let a:state.from = ''
|
||||||
let a:state.to = ''
|
let a:state.to = ''
|
||||||
let exec = s:UserCommandList({'git': a:options.git, 'dir': a:options.dir}) + ['-c', 'diff.context=0'] + a:options.flags + ['--no-pager', 'diff', '--no-ext-diff', '--no-color', '--no-prefix'] + argv
|
let exec = s:UserCommandList({'git': a:options.git, 'dir': a:options.dir})
|
||||||
|
if fugitive#GitVersion(1, 9) || (!s:HasOpt(argv, '--name-status') && !prompt)
|
||||||
|
let exec += ['-c', 'diff.context=0']
|
||||||
|
endif
|
||||||
|
let exec += a:options.flags + ['--no-pager', 'diff', '--no-ext-diff', '--no-color', '--no-prefix'] + argv
|
||||||
if prompt
|
if prompt
|
||||||
let title = ':Git ' . s:fnameescape(a:options.flags + [a:options.command] + a:options.args)
|
let title = ':Git ' . s:fnameescape(a:options.flags + [a:options.command] + a:options.args)
|
||||||
return s:QuickfixStream(a:line2, 'difftool', title, exec, !a:bang, s:function('s:ToolParse'), a:state)
|
return s:QuickfixStream(a:line2, 'difftool', title, exec, !a:bang, s:function('s:ToolParse'), a:state)
|
||||||
|
|||||||
Reference in New Issue
Block a user