aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2020-06-18 10:05:40 +0200
committerMartin Liska <mliska@suse.cz>2020-06-18 10:07:59 +0200
commit09f9c1eefb8dffba779570da390bd7e8102ebcd5 (patch)
treed4ef5f246d84c5d8dad113c69b799c16f33fb195 /contrib
parentaff95ee7cc2c046d69ff6f79990930fb22e0e808 (diff)
downloadgcc-09f9c1eefb8dffba779570da390bd7e8102ebcd5.zip
gcc-09f9c1eefb8dffba779570da390bd7e8102ebcd5.tar.gz
gcc-09f9c1eefb8dffba779570da390bd7e8102ebcd5.tar.bz2
gcc-changelog: fix Backported from timestamp.
contrib/ChangeLog: * gcc-changelog/git_commit.py: Fix Backported from timestamp when use_commit_ts=True is used.
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/gcc-changelog/git_commit.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/gcc-changelog/git_commit.py b/contrib/gcc-changelog/git_commit.py
index ab9fdbd..4a78793 100755
--- a/contrib/gcc-changelog/git_commit.py
+++ b/contrib/gcc-changelog/git_commit.py
@@ -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