Repository navigation
Name the authors of each file from its history - #709
Merged
Merged
Conversation
aalex
approved these changes
Dec 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/update-copyright.pywrites these lines from the history of git (git log --follow), and--checklists the files that are not up to date. A commit that only changes spaces, only the lines of the authors, or only renames a file is not a contribution, nor are the mass edits listed in.git-blame-ignore-revs. Authors that the history does not know, such as those of code older than MapMap (Drone, Toonloop), are kept with their notes. Third-party code (src/control/qosc,third_party) and the files without the licence header (src/app/main.cpp,src/control/ConcurrentQueue.h) are left as they are..mailmapgives each person one name: Tats and Sofian are Sofian Audry, baydam and Bay Dam are Dame Diongue, and ltsAdair, jonathan and sylvain are Lucas Adair, Jonathan Roman Bland and Sylvain Cormier, as inCONTRIBUTORS.md.git log,git shortlogandgit blameread it too. Other people keep the name of their commits..git-blame-ignore-revslists 9 mass edits: the namespaces of 2016, the moves of files of 2017, and the renaming of Paint to Source and Mapping to Layer of 2026. GitHub's blame view skips them, and so doesgit blamewithgit config blame.ignoreRevsFile .git-blame-ignore-revs.AGENTS.mdasks for one line per author in a new file, and to run the script before a release.dev, the commit that rewrites the headers goes in.git-blame-ignore-revs, in a later commit: its hash changes when it is integrated.Demo
src/gui/MapperGLCanvas.cpporsrc/core/VideoImpl.h: the header names each author with their years.python3 scripts/update-copyright.py --check: it lists nothing, and running the script again changes nothing.git shortlog -sn: each person is counted once.Tests
QT_QPA_PLATFORM=offscreen), after a rebase ondev; only comment lines change in the C++ files.python3 -m unittest tests.test_update_copyright: 11 tests, on headers and on a small repository made for the test (names from.mailmap, spaces, lines of authors, mass edits, a second run).tests/test_convert_beta1_project.pyalready fails ondev: its referencetests/fixtures/beta.2/triangle-color.mmpchanged on 2026-11-28. Not changed here.