From fe8b5eb4c5a645e31ce13d97bd70531fbec98de6 Mon Sep 17 00:00:00 2001 From: spar01 <42012448+spar01@users.noreply.github.com> Date: Thu, 2 Aug 2018 01:57:48 -0700 Subject: [PATCH] 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 --- autoload/sy/repo.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/sy/repo.vim b/autoload/sy/repo.vim index f6f1e0f..f44cf6b 100644 --- a/autoload/sy/repo.vim +++ b/autoload/sy/repo.vim @@ -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' \ }