diff mbox series

gcc-changelog: fix Backported from timestamp.

Message ID 7fde1862-5dfb-dc8a-90eb-d83a759ec42b@suse.cz
State New
Headers show
Series gcc-changelog: fix Backported from timestamp. | expand

Commit Message

Martin Liška June 18, 2020, 8:07 a.m. UTC
We should have generated:

+2020-06-17  Harald Anlauf  <anlauf@gmx.de>
+
+	Backported from master:
+	2020-06-14  Harald Anlauf  <anlauf@gmx.de>
+
+	PR fortran/95088
+	* gfortran.dg/pr95088.f90: New file.

but the script did:

+2020-06-17  Harald Anlauf  <anlauf@gmx.de>
+
+       Backported from master:
+       2020-06-17  Harald Anlauf  <anlauf@gmx.de>
+
+       PR fortran/95088
+       * class.c (get_unique_type_string): Replace use of fixed size
+       buffer by internally passing a pointer to strings.

It's fixed in the patch that I'm going to push.

Martin

contrib/ChangeLog:

	* gcc-changelog/git_commit.py: Fix Backported from timestamp when
	use_commit_ts=True is used.
---
  contrib/gcc-changelog/git_commit.py | 6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)
diff mbox series

Patch

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