> 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.

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/29467/files
  - new: https://git.openjdk.org/jdk/pull/29467/files/8495999b..c25145bf

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=29467&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29467&range=00-01

  Stats: 12 lines in 1 file changed: 1 ins; 0 del; 11 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

Reply via email to