On Wed, 28 Jan 2026 18:55:53 GMT, Jan Lahoda <[email protected]> wrote:

>> There's a script to update copyright years for all files inside changesets 
>> in a given branch:
>> bin/update_copyright_year.sh
>> 
>> Unfortunately, this is not always ideal for development branches: 
>> development branches may contain changes to files that are reverted to the 
>> original state later in that branch. As commits inside development branches 
>> are squashed at the end, these files are not updated in the final commits, 
>> and the copyright headers should not be updated.
>> 
>> My proposal here is to augment bin/update_copyright_year.sh with an ability 
>> to update the years for a given list of files. The list of files is read 
>> from stdin. Then one can use a command line like:
>> 
>> $ git diff upstream/master...<branch-name> | lsdiff | cut -d '/' -f 2- | 
>> bash bin/update_copyright_year.sh -m
>> 
>> To update the years for all files really modified on a given branch.
>> 
>> I am not an expert on shell/bash, so it is quite possible there are some 
>> mistakes here.
>> 
>> What do you think? Thanks!
>
> Jan Lahoda has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Allowing to specify a file to read the file list from, as suggested.

Marked as reviewed by erikj (Reviewer).

-------------

PR Review: https://git.openjdk.org/jdk/pull/29467#pullrequestreview-3719031405

Reply via email to