New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix copyright year issues #17427
Fix copyright year issues #17427
Conversation
"git log -1 --date=format:%Y --format=format:%ad $file 2>/dev/null|" | ||
"git log -1 --date=short --format=format:%cd $file 2>/dev/null|" | ||
or return $YEAR; | ||
my $LINE = <$FH>; | ||
close $FH; | ||
chomp($LINE); | ||
$LINE =~ s/^([0-9]*)-.*/$1/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bernd-edlinger can you please explain the change? I.E. do you think it will help the next time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least some get versions don't understand the --date=format:%Y
and frankly I don't find where this
form of the --date
option is documented at all.
OTOH --date=short
should always work. we just have to parse the YYYY-MM-DD format and extract the year.
When this command is not understood we have a different result which makes the make update change to 2022.
Additionally I think this is better to use the commit date instead of the author date, since the merge may be
in a later year than the original commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The update of the .pl files is only necessary because of #17398, otherwise that commit would need to be reverted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The update of the .pl files is only necessary because of #17398, otherwise that commit would need to be reverted.
That's actually a question - should it be reverted instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, yes. I don't have a strong opinion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you guys agree, I will update the PR to not touch the .pl
files, and restore the 2021 copyright in the generated files
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, the CI failure of 96b5b11 is a bit unexpected.
Apparently some commit dates are changed when the CI re-bases the PR,
but I am not able to reproduce that at home...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, the CI uses git fetch --depth=1
this fetches no history beyond the merge commit, which is always new.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, the CI uses
git fetch --depth=1
this fetches no history beyond the merge commit, which is always new.
That is pretty common. In Jenkins, I force all history and tags mostly to get the tags. Surely there must be a way to change this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, adding with: fetch-depth:0
in the right place fixes it.
8f5752a
to
1c1c698
Compare
1c1c698
to
86bc75c
Compare
I checked that this should work for 3.0 too. |
OK for master and 3.0. I do not think we should bother with 1.1.1. |
Also marking as urgent as the CI on the pushes (not on pull requests) is broken currently due to this issue. If you agree, please merge right away. |
Thanks a lot @bernd-edlinger for taking care of this! |
Fixes: #13765