On Wed, 28 Jan 2026 14:18:43 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! This pull request has now been integrated. Changeset: 5fec0f32 Author: Jan Lahoda <[email protected]> URL: https://git.openjdk.org/jdk/commit/5fec0f3287a64aa56e04ad7c0222dca49a0992e0 Stats: 123 lines in 1 file changed: 46 ins; 23 del; 54 mod 8376585: bin/update_copyright_year.sh could allow updating a specified list of files Reviewed-by: erikj ------------- PR: https://git.openjdk.org/jdk/pull/29467
