Perforce: fix command (#267)

Commit cc2b17d462c9460c2f5f4a0d71a3edf6e6a71987 removed the '&&' used to check whether the p4 info command succeeded. This caused incorrect invocation of the p4 diff command.
Add back the check for p4 info command success.

Prior to this commit the command invoked was:
p4 info >/dev/null 2>&1 env P4DIFF= P4COLORS= p4 diff -du0

This commit makes the invocation as:
p4 info >/dev/null 2>&1 && env P4DIFF= P4COLORS= p4 diff -du0
This commit is contained in:
spar01 2018-08-02 01:57:48 -07:00 committed by Marco Hinz
parent e94764e40c
commit fe8b5eb4c5

View File

@ -452,7 +452,7 @@ let s:default_vcs_cmds = {
\ 'cvs': 'cvs diff -U0 -- %f',
\ 'rcs': 'rcsdiff -U0 %f 2>%n',
\ 'accurev': 'accurev diff %f -- -U0',
\ 'perforce': 'p4 info '. sy#util#shell_redirect('%n') . (has('win32') ? '' : ' env P4DIFF= P4COLORS=') .' p4 diff -du0 %f',
\ 'perforce': 'p4 info '. sy#util#shell_redirect('%n') . (has('win32') ? ' &&' : ' && env P4DIFF= P4COLORS=') .' p4 diff -du0 %f',
\ 'tfs': 'tf diff -version:W -noprompt -format:Unified %f'
\ }