Make mklog more robust.
diff mbox series

Message ID 25cf0e1b-5f70-bc45-c471-eae624597bf9@suse.cz
State New
Headers show
Series
  • Make mklog more robust.
Related show

Commit Message

Martin Liška Nov. 7, 2019, 8:55 a.m. UTC
Hi.

The patch makes mklog more robust for a line in patch:
'---param=foo=bar xyz'.

I'm going to install it if there are no objections.
Martin

contrib/ChangeLog:

2019-11-07  Martin Liska  <mliska@suse.cz>

	* mklog: The script fails for patches that contain:
	'---param=foo=bar xyz'.
---
  contrib/mklog | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/contrib/mklog b/contrib/mklog
index 1a0e82d1ddd..71fd427ff61 100755
--- a/contrib/mklog
+++ b/contrib/mklog
@@ -178,8 +178,8 @@  class Hunk:
 def is_file_diff_start(s):
   # Don't be fooled by context diff line markers:
   #   *** 385,391 ****
-  return ((s.startswith('***') and not s.endswith('***'))
-          or (s.startswith('---') and not s.endswith('---')))
+  return ((s.startswith('*** ') and not s.endswith('***'))
+          or (s.startswith('--- ') and not s.endswith('---')))
 
 def is_ctx_hunk_start(s):
   return re.match(r'^\*\*\*\*\*\**', s)