On Wed, 24 Dec 2025 07:21:19 GMT, Sergey Bylokhov <[email protected]> wrote:

> This patch updates the remaining files in java.base that were not covered by 
> other recent PRs related to copyright updates.
> 
> The next command can be run (on top of this PR) to verify that each file had 
> prior commits in 2025:
> 
> `git diff HEAD~1 --name-only | while read f; do git log HEAD~1 
> --since="2025-01-01" --oneline -- "$f" | head -1 | grep -q . || echo "NOT IN 
> 2025: $f"; done `

`git diff HEAD~1 --name-only | while read f; do git log HEAD~1 
--since="2025-01-01" --oneline -- "$f" | head -1 | grep -q . || echo "NOT IN 
2025: $f"; done`

The first command checks the files changed in the last commit of the PR and 
verifies whether each file has any commit history since January 1, 2025. If 
not, it prints "NOT IN 2025".

`git diff origin/master --name-only | while read f; do git log origin/master 
--since="2025-01-01" --oneline -- "$f" | head -1 | grep -q . || echo "NOT IN 
2025: $f"; done
`
The disadvantage of the first command is that it depends on a specific commit. 
The second command avoids this by comparing the current PR against master and 
using that diff as the list of changed files.

To test the second command, modify and commit a file in the PR branch that has 
not been modified in 2025. The script will flag it as "NOT IN 2025", because 
this PR is expected to change only files that already have commits on master in 
2025.

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

PR Comment: https://git.openjdk.org/jdk/pull/28980#issuecomment-3701263133

Reply via email to