Method: Command::Diff#create_difftool_command_string

Defined in:
lib/command/diff.rb

#create_difftool_command_string(temp_old_path, temp_new_path) ⇒ Object



167
168
169
170
171
172
173
174
175
176
177
178
# File 'lib/command/diff.rb', line 167

def create_difftool_command_string(temp_old_path, temp_new_path)
  diff_arg = Inventory.load("global_setting", :global)["difftool.arg"]
  diff_cmd = %!"#{@difftool}" !
  if diff_arg
    diff_arg.gsub!("%OLD", temp_old_path)
    diff_arg.gsub!("%NEW", temp_new_path)
    diff_cmd += diff_arg
  else
    diff_cmd += [temp_old_path, temp_new_path].join(" ")
  end
  diff_cmd
end