This helps to avoid accidental shrinking of copyright years range.
* maint/update_copyright_years.sh: Take all commits into account
to find copyright years of the earliest and the latest commit.
continue
fi
- last_commit_year=$(date -u +%Y -d "$(git log -n1 --format=format:%aD \
- -- "$f")")
- first_commit_year=$(date -u +%Y -d "$(git log --reverse --format=format:%aD \
- -- "$f" | head -n 1)")
+ last_commit_year=$(date -u +%Y -d "@$(git log --format=format:%at -- "$f" |
+ sort -rn |head -n1)")
+ first_commit_year=$(date -u +%Y -d "@$(git log --format=format:%at -- "$f" |
+ sort -n |head -n1)")
copyright_year=$(printf '%s' "$copyright_year_raw" |
sort -r -n | head -n 1)
start_note='from git log'