Perforce: avoid colored output on Unixes

On Unix, many people use P4DIFF=colordiff to get colored diff output with `p4
diff`. But our diff parser doesn't expect these escape sequences used for
coloring.

We now simply use empty $P4DIFF and $P4COLORS to be on the safe side.

Reference:

  36c7d22a69 (commitcomment-29924066)
This commit is contained in:
Marco Hinz 2018-08-01 20:29:09 +02:00
parent a9fc705b9b
commit cc2b17d462
No known key found for this signature in database
GPG Key ID: 1C980A1B657B4A4F
2 changed files with 2 additions and 2 deletions

View File

@ -452,7 +452,7 @@ let s:default_vcs_cmds = {
\ 'cvs': 'cvs diff -U0 -- %f', \ 'cvs': 'cvs diff -U0 -- %f',
\ 'rcs': 'rcsdiff -U0 %f 2>%n', \ 'rcs': 'rcsdiff -U0 %f 2>%n',
\ 'accurev': 'accurev diff %f -- -U0', \ 'accurev': 'accurev diff %f -- -U0',
\ 'perforce': 'p4 info '. sy#util#shell_redirect('%n') .' && 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' \ 'tfs': 'tf diff -version:W -noprompt -format:Unified %f'
\ } \ }

View File

@ -255,7 +255,7 @@ Default:
\ 'cvs': 'cvs diff -U0 -- %f', \ 'cvs': 'cvs diff -U0 -- %f',
\ 'rcs': 'rcsdiff -U0 %f 2>%n', \ 'rcs': 'rcsdiff -U0 %f 2>%n',
\ 'accurev': 'accurev diff %f -- -U0', \ 'accurev': 'accurev diff %f -- -U0',
\ 'perforce': 'p4 info '. sy#util#shell_redirect('%n') .' && 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 %f', \ 'tfs': 'tf diff -version:W -noprompt %f',
\ } \ }
< <