Escape 2>&1 in the p4 detection

References #157.
This commit is contained in:
Stephan Steinbach 2015-04-14 09:54:47 -07:00 committed by Marco Hinz
parent 06c51319c0
commit 5cdf72acd1

View File

@ -163,7 +163,7 @@ endfunction
" Function: #get_diff_perforce {{{1
function! sy#repo#get_diff_perforce() abort
let diffoptions = has_key(g:signify_diffoptions, 'perforce') ? g:signify_diffoptions.perforce : ''
let diff = system('p4 info 2>&1 >' . sy#util#devnull() . ' && env P4DIFF=diff p4 diff -dU0 '. diffoptions .' '. sy#util#escape(b:sy.path))
let diff = system(sy#util#escape('p4 info 2>&1 >') . sy#util#devnull() . ' && env P4DIFF=diff p4 diff -dU0 '. diffoptions .' '. sy#util#escape(b:sy.path))
return v:shell_error ? [0, ''] : [1, diff]
endfunction