insert-license: new --use-current-year optional flag
Handling years flexibly
You can add --use-current-year
to change how the hook treats years in the
headers:
- When inserting a header, the current year will always be inserted
regardless of the year listed in the license file. - When modifying a file that already has a header, the hook will ensure the
current year is listed in the header by using a range. For instance,
2015
or2015-2018
would get updated to2015-2023
in the year 2023. - When removing headers, the licenses will be removed regardless of the
years they contain -- as if they used the year currently present in the
license file.