find-backports: fix Ignore-Fixes detection
The regex for "Fixes" also matches with "Ignore-Fixes", so the commit is added twice and then removed only once by the "Ignore-Fixes". It still remains once in the list of commits to backport, making that "Ignore-Fixes" does not work. Fix it.
This commit is contained in:
@@ -193,7 +193,7 @@ def git_ref_commit_body(ref):
|
||||
def git_ref_commit_body_get_fixes(ref):
|
||||
body = git_ref_commit_body(ref)
|
||||
result = []
|
||||
for mo in re.finditer(re_bin("\\b[fF]ixes: *([0-9a-z]+)\\b"), body):
|
||||
for mo in re.finditer(re_bin("^\\s*[fF]ixes: *([0-9a-z]+)\\b"), body, flags=re.MULTILINE):
|
||||
c = mo.group(1).decode("ascii")
|
||||
h = git_ref_exists(c)
|
||||
if h:
|
||||
@@ -202,7 +202,7 @@ def git_ref_commit_body_get_fixes(ref):
|
||||
# The commit that contains a "Fixes:" line, can also contain an "Ignore-Fixes:" line
|
||||
# to disable it. This only makes sense with refs/notes/bugs notes, to fix up a wrong
|
||||
# annotation.
|
||||
for mo in re.finditer(re_bin("\\bIgnore-[fF]ixes: *([0-9a-z]+)\\b"), body):
|
||||
for mo in re.finditer(re_bin("^\\s*Ignore-[fF]ixes: *([0-9a-z]+)\\b"), body, flags=re.MULTILINE):
|
||||
c = mo.group(1).decode("ascii")
|
||||
h = git_ref_exists(c)
|
||||
try:
|
||||
|
Reference in New Issue
Block a user