gcc-changelog: fix Backported from timestamp.

contrib/ChangeLog:

	* gcc-changelog/git_commit.py: Fix Backported from timestamp when
	use_commit_ts=True is used.
This commit is contained in:
Martin Liska 2020-06-18 10:05:40 +02:00
parent aff95ee7cc
commit 09f9c1eefb
No known key found for this signature in database
GPG Key ID: 4DC182DC0FA73785
1 changed files with 5 additions and 1 deletions

View File

@ -615,9 +615,13 @@ class GitCommit:
timestamp = entry.datetime
if self.cherry_pick_commit:
timestamp = self.commit_to_date_hook(self.cherry_pick_commit)
# it can happen that it is a cherry-pick for a different
# repository
if timestamp:
timestamp = timestamp.strftime(DATE_FORMAT)
if not timestamp or use_commit_ts:
else:
timestamp = current_timestamp
elif not timestamp or use_commit_ts:
timestamp = current_timestamp
authors = entry.authors if entry.authors else [self.author]
# add Co-Authored-By authors to all ChangeLog entries