There is already a script to update or insert copyright headers in the correct format -
This is a contrib script intended as a helper wrapping around the existing script, intended to allow the script to work on the entire source directory with accurate dates.
The script works in the following way:
- It runs
copyright_headers.pyon the source tree in update mode
- It processes the output to find files that do not have an existing line to update
- It filters those files to remove the third party libraries and auto-generated files
- It runs
copyright_headers.pyagain on the identified files in insert mode
- It reports insertions, or no-changes, in the same format as
The existing script has been modified to only find changes since the fork commit,
964a185cc83af34587194a6ecda3ed9cf6b49263, so it will not erroneously add new copyright lines for "the bitcoin developers" in duplicate, for changes made in Core before the fork and already marked "the bitcoin core developers".
Output has also had an over-exuberant exclamation mark removed.
A separate MR has been raised to actually update the copyright notices: !1550 (merged)
Examine the git diffs to verify the changes look acceptable. Spot check several files with
git log to confirm the newly updated and inserted copyright periods are correct.