support quotation in tag message
authorLin Yang <lin.a.yang@intel.com>
Tue, 8 Jan 2013 10:02:40 +0000 (18:02 +0800)
committerLin Yang <lin.a.yang@intel.com>
Thu, 28 Feb 2013 08:00:35 +0000 (16:00 +0800)
Change-Id: Ia30da7d0bdc7a67b0197de297082adb13acd77bc

common/git.py

index 0c4a3b1..7a7dd3f 100644 (file)
@@ -281,7 +281,7 @@ class Git:
         """Creat a tag with name at commit""" 
         if self.rev_parse(commit) is None:
             raise errors.GitError('%s is invalid commit ID' % commit)
-        options = [name, '-m "%s"' % msg.replace('"', '\\"'), commit]
+        options = [name, '-m "%s"' % msg.replace('"', '\''), commit]
         self._exec_git('tag', options)
 
     def merge(self, commit):