chiark / gitweb /
Improve the description/diff splitting when parsing patches
authorCatalin Marinas <catalin.marinas@arm.com>
Fri, 31 Jul 2009 09:20:08 +0000 (10:20 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 31 Jul 2009 09:20:08 +0000 (10:20 +0100)
Some patches don't have any of the separations already in use like ---,
diff - or Index. So look for the first "--- */" line.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
stgit/commands/common.py

index 23ba4b32852144dd1dd706bac841b52f1ea71e24..c769266d43ee4a2c822589563bb63f89bdb348aa 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