From 41ba116c3d91864bce602493ac518c838d9667ac Mon Sep 17 00:00:00 2001 From: Clemens Auer Date: Mon, 19 Nov 2012 10:31:01 +0100 Subject: [PATCH] Correct escaping of single- and double-quotes. This fixes an issue that occured when the commit message/annotation contains a double-quote. For some reason the original code replaced a `'` with `'\''`. the changed code replaces a `'` with `\'` and a `"` with `\"`. --- lib/svn2git/migration.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/svn2git/migration.rb b/lib/svn2git/migration.rb index 30c078c..56b54b9 100644 --- a/lib/svn2git/migration.rb +++ b/lib/svn2git/migration.rb @@ -330,7 +330,7 @@ def verify_working_tree_is_clean end def escape_quotes(str) - str.gsub("'", "'\\\\''") + str.gsub("'", "\\\\'").gsub('"', '\\\\"') end end