diff --git a/contrib/scripts/find-backports b/contrib/scripts/find-backports index e1c5aa419..c9ec1c0d6 100755 --- a/contrib/scripts/find-backports +++ b/contrib/scripts/find-backports @@ -156,6 +156,18 @@ def git_ref_commit_body_get_fixes(ref): h = git_ref_exists(c) if h: result.append(h) + if result: + # 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): + c = mo.group(1).decode("ascii") + h = git_ref_exists(c) + try: + result.remove(h) + except ValueError: + pass + return result