public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/autopar_devel] gcc-changelog: fix Backported from timestamp.
@ 2020-08-22 22:46 Giuliano Belinassi
  0 siblings, 0 replies; only message in thread
From: Giuliano Belinassi @ 2020-08-22 22:46 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:c3f3d1378b3b56bd0ca75bad250bcf085c51ec6d

commit c3f3d1378b3b56bd0ca75bad250bcf085c51ec6d
Author: Martin Liska <mliska@suse.cz>
Date:   Thu Jun 18 10:05:40 2020 +0200

    gcc-changelog: fix Backported from timestamp.
    
    contrib/ChangeLog:
    
            * gcc-changelog/git_commit.py: Fix Backported from timestamp when
            use_commit_ts=True is used.

Diff:
---
 contrib/gcc-changelog/git_commit.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/contrib/gcc-changelog/git_commit.py b/contrib/gcc-changelog/git_commit.py
index ab9fdbd52fd..4a78793b87e 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-22 22:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-22 22:46 [gcc/devel/autopar_devel] gcc-changelog: fix Backported from timestamp Giuliano Belinassi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).