Handle multi-line Subject header better
[stgit] / stgit / commands / common.py
index 1bc162f..23ba4b3 100644 (file)
@@ -120,7 +120,7 @@ def check_head_top_equal(crt_series):
 def check_conflicts():
     if git.get_conflicts():
         raise CmdException('Unsolved conflicts. Please fix the conflicts'
-                           ' then use "resolve <files>" or revert the'
+                           ' then use "git add --update <files>" or revert the'
                            ' changes with "status --reset".')
 
 def print_crt_patch(crt_series, branch = None):
@@ -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