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! ------------- Commit messages: - 8376585: bin/update_copyright_year.sh could allow updating a specified list of files Changes: https://git.openjdk.org/jdk/pull/29467/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29467&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8376585 Stats: 121 lines in 1 file changed: 45 ins; 23 del; 53 mod Patch: https://git.openjdk.org/jdk/pull/29467.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29467/head:pull/29467 PR: https://git.openjdk.org/jdk/pull/29467
