chiark / gitweb /
Make sure the refid given to 'mail' has the angle brackets
authorCatalin Marinas <catalin.marinas@gmail.com>
Fri, 7 Dec 2007 21:19:25 +0000 (21:19 +0000)
committerCatalin Marinas <catalin.marinas@gmail.com>
Fri, 7 Dec 2007 21:19:25 +0000 (21:19 +0000)
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
stgit/commands/mail.py

index 53cd239cb583505901ec476a23fa15d13ac0803c..eea84f2ed979ff095a2bad62b6aea424e71c05b9 100644 (file)
@@ -272,6 +272,8 @@ def __build_extra_headers(msg, msg_id, ref_id = None):
     msg['Date'] = email.Utils.formatdate(localtime = True)
     msg['Message-ID'] = msg_id
     if ref_id:
+        # make sure the ref id has the angle brackets
+        ref_id = '<%s>' % ref_id.strip(' \t\n<>')
         msg['In-Reply-To'] = ref_id
         msg['References'] = ref_id
     msg['User-Agent'] = 'StGIT/%s' % version.version