chiark / gitweb /
Merge branch 'proposed' of git://github.com/gustavh/stgit
[stgit] / stgit / commands / common.py
index d64cce13336dd91ea097cd1e1f3db381ef054d1b..d38d263843da340002fa1343c5c3fc8868449ae6 100644 (file)
@@ -323,7 +323,7 @@ def post_rebase(crt_series, applied, nopush, merged):
 #
 def __end_descr(line):
     return re.match('---\s*$', line) or re.match('diff -', line) or \
-            re.match('Index: ', line)
+            re.match('Index: ', line) or re.match('--- \w', line)
 
 def __split_descr_diff(string):
     """Return the description and the diff from the given string
@@ -405,7 +405,8 @@ def parse_mail(msg):
         authname = authemail = None
 
     # '\n\t' can be found on multi-line headers
-    descr = __decode_header(msg['subject']).replace('\n\t', ' ')
+    descr = __decode_header(msg['subject'])
+    descr = re.sub('\n[ \t]*', ' ', descr)
     authdate = msg['date']
 
     # remove the '[*PATCH*]' expression in the subject