aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Kågedal <david@virtutech.com>2009-09-03 18:24:21 +0200
committerKarl Wiberg <kha@treskal.com>2009-09-03 18:24:54 +0200
commitce4c86fa8d57eb809e291fb87613951414de2b71 (patch)
treee1be1d4ef6af6a405c70caada3c41a8a0348ddc9
parent5ab0897e67b0203470690a11885b61ca1cb4ab8a (diff)
downloadstgit-ce4c86fa8d57eb809e291fb87613951414de2b71.tar.gz
Escape patch name when creating regexp
Signed-off-by: David Kågedal <david@virtutech.com> Signed-off-by: Karl Wiberg <kha@treskal.com>
-rw-r--r--stgit/commands/repair.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/stgit/commands/repair.py b/stgit/commands/repair.py
index 37c4bab..5804a12 100644
--- a/stgit/commands/repair.py
+++ b/stgit/commands/repair.py
@@ -108,7 +108,7 @@ def read_commit_dag(branch):
commits[id].children.add(commits[cs[0]])
for line in Run('git', 'show-ref').output_lines():
id, ref = line.split()
- m = re.match(r'^refs/patches/%s/(.+)$' % branch, ref)
+ m = re.match(r'^refs/patches/%s/(.+)$' % re.escape(branch), ref)
if m and not m.group(1).endswith('.log'):
c = commits[id]
c.patch = m.group(1)