lib/svn2git/migration.rb in svn2git-2.2.4 vs lib/svn2git/migration.rb in svn2git-2.2.5
- old
+ new
@@ -143,10 +143,18 @@
@opts.parse! args
options
end
+ def self.escape_quotes(str)
+ str.gsub(/'|"/) { |c| "\\#{c}" }
+ end
+
+ def escape_quotes(str)
+ Svn2Git::Migration.escape_quotes(str)
+ end
+
private
def clone!
trunk = @options[:trunk]
branches = @options[:branches]
@@ -370,13 +378,9 @@
status = run_command('git status --porcelain --untracked-files=no')
unless status.strip == ''
puts 'You have local pending changes. The working tree must be clean in order to continue.'
exit -1
end
- end
-
- def escape_quotes(str)
- str.gsub("'", "'\\\\''")
end
def git_config_command
if @git_config_command.nil?
status = run_command('git config --local --get user.name', false)