public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Martin Liška" <mliska@suse.cz>
To: gcc-patches@gcc.gnu.org
Cc: Tobias Burnus <tobias@codesourcery.com>
Subject: [PATCH (pushed)] mklog: do not depend on recent unidiff version
Date: Wed, 14 Dec 2022 11:34:24 +0100	[thread overview]
Message-ID: <2672593b-414a-d1b4-8e84-abdba0915410@suse.cz> (raw)
In-Reply-To: <5f53c39a-2964-c67c-2773-8b40c6925425@codesourcery.c>

contrib/ChangeLog:

	* mklog.py: Check for number of hunks and not if a modified
	file is binary.
---
 contrib/mklog.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/contrib/mklog.py b/contrib/mklog.py
index 358b7fc6b8b..5dea8a05c0c 100755
--- a/contrib/mklog.py
+++ b/contrib/mklog.py
@@ -186,8 +186,9 @@ def generate_changelog(data, no_functions=False, fill_pr_titles=False,
             # contains commented code which a note that it
             # has not been tested due to a certain PR or DR.
             this_file_prs = []
-            if not file.is_binary_file:
-                for line in list(file)[0][0:10]:
+            hunks = list(file)
+            if hunks:
+                for line in hunks[0][0:10]:
                     m = pr_regex.search(line.value)
                     if m:
                         pr = m.group('pr')
-- 
2.38.1


           reply	other threads:[~2022-12-14 10:34 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <5f53c39a-2964-c67c-2773-8b40c6925425@codesourcery.c>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2672593b-414a-d1b4-8e84-abdba0915410@suse.cz \
    --to=mliska@suse.cz \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=tobias@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).