Use array mode of system instead of shellescape

`&.` is not available in ruby 2.0.
This commit is contained in:
Nobuyoshi Nakada 2019-04-30 22:23:20 +09:00
parent df3de40932
commit 50872f4a15
No known key found for this signature in database
GPG Key ID: 4BC7D6DF58D8DF60

View File

@ -196,10 +196,11 @@ class << Merger
def diff(file = nil)
if svn_mode?
`svn diff --diff-cmd=diff -x -upw #{file&.shellescape}`
command = %w[svn diff --diff-cmd=diff -x -upw]
else
`git diff --color #{file&.shellescape}`
command = %w[git diff --color]
end
IO.popen(command + [file], &:read)
end
def commit(file)