RFR: 827: Copyright year differences can be regarded as a clean backport [v3]

Erik Joelsson erikj at openjdk.org
Mon Sep 18 22:43:05 UTC 2023

On Tue, 12 Sep 2023 20:47:54 GMT, Zhao Song <zsong at openjdk.org> wrote:

>> As many users requested, when determining whether a backport is clean, our bot should ignore copyright year difference.
> Zhao Song has updated the pull request incrementally with two additional commits since the last revision:
>  - fix whitespace issue
>  - add unit test

vcs/src/main/java/org/openjdk/skara/vcs/DiffComparator.java line 32:

> 30:     private static final Pattern COPYRIGHT_PATTERN = Pattern.compile("""
> 31:             -(.)*Copyright \\(c\\) (?:\\d|\\s|,)* Oracle and/or its affiliates\\. All rights reserved\\.
> 32:             \\+(.)*Copyright \\(c\\) (?:\\d|\\s|,)* Oracle and/or its affiliates\\. All rights reserved\\.

If the only difference between these lines is the first character, we should only need one line.

            [-+](.)*Copyright \(c\) (?:\\d|\\s|,)* Oracle and/or its affiliates\. All rights reserved\.


PR Review Comment: https://git.openjdk.org/skara/pull/1556#discussion_r1329351931

More information about the skara-dev mailing list