-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
File creation year is inaccurate by default #300
Comments
I looked into potential fixes for this. First note: this was originally reported by @brenuart in #151 but the issue was closed because there was a workaround available (per my comments above) and the issue went stale without being addressed. Second note: this is a git-only issue. The copyright range for SVN uses the inception year. Since original commit author, email, or year is not returned by the substitutions, the warning just put in by #253 for sparse SVN history actually doesn' t matter. This seems a bit inconsistent and is outside the scope of this Issue, but I thought I'd mention it. There clearly needs to be better documentation of these features. I think there are some potential fixes. Happy to submit a PR, but would like @mathieucarbou or other committer to identify which direction to go. My preference is option 3 or 1. Option 1: Simply change
Option 2: Do nothing, but clearly document that when the copyright creation year, copyright creation author, or copyright creation email keys (or the existence years which includes the creation year), that the copyright last year commit history setting is relevant.
Option 3: Add a new parameter/property
Option 4: Leave the existing default, but add overloaded
|
I've been running rc2 for a while, using the copyright existence years implemented by #240, and it has been showing somewhat odd behavior, changing license headers on unrelated commits. The behavior was similar to what I saw when the repository was shallow (addressed by #252) but I confirmed full depth. But it's still showing wrong date ranges.
I finally dug into the code and saw that the default commits count (for lookback) was set to 10. This is problematic for calculating creation year, which simply walks from the oldest commit until it runs out of commits to check. But "oldest" is set by the commit history depth (similar to shallow checkouts) where it filters whole tree by commit number and then sorts it.
As noted in adobe/S3Mock#241 (comment) it is possible to add a property for larger histories:
Some issues with this:
<properties>
or<configuration>
for the license plugin. It does work for me on the command line with-Dlicense.git.copyrightLastYearMaxCommitsLookup=100000
.The text was updated successfully, but these errors were encountered: