mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
mq: allow lines starting with '--- ' in patch messages
This commit is contained in:
parent
0ad95ca3aa
commit
40a289572d
@ -96,13 +96,11 @@ class patchheader(object):
|
||||
|
||||
for line in file(pf):
|
||||
line = line.rstrip()
|
||||
if line.startswith('diff --git'):
|
||||
if (line.startswith('diff --git')
|
||||
or (diffstart and line.startswith('+++ '))):
|
||||
diffstart = 2
|
||||
break
|
||||
if diffstart:
|
||||
if line.startswith('+++ '):
|
||||
diffstart = 2
|
||||
break
|
||||
diffstart = 0 # reset
|
||||
if line.startswith("--- "):
|
||||
diffstart = 1
|
||||
continue
|
||||
|
@ -43,6 +43,7 @@ Text before patch.
|
||||
First line of commit message.
|
||||
|
||||
More text in commit message.
|
||||
--- confuse the diff detection
|
||||
|
||||
diff --git a/x b/x
|
||||
new file mode 100644
|
||||
|
Loading…
Reference in New Issue
Block a user