From b868beea10096df8e54c8b1175659f491a0b03dd Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 11 Oct 2025 09:44:32 +0900 Subject: [PATCH 1/4] commit-email.rb: Suppres git signed commit signatures When setting `log.showSignature=true`, `git log` and `git show` include messages gpg verfied the commits, in addition to the message specified by `--pretty`. --- tool/commit-email.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tool/commit-email.rb b/tool/commit-email.rb index f738261dcca6cd..2381a74debde45 100755 --- a/tool/commit-email.rb +++ b/tool/commit-email.rb @@ -121,7 +121,7 @@ def build_diff(path, numstats) end def git_show(revision, format:) - git('show', "--pretty=#{format}", '--no-patch', revision).strip + git('show', '--no-show-signature', "--pretty=#{format}", '--no-patch', revision).strip end def git(*args) @@ -180,7 +180,7 @@ def main(repo_path, to, rest) args, options = parse(rest) infos = args.each_slice(3).flat_map do |oldrev, newrev, refname| - revisions = IO.popen(['git', 'log', '--reverse', '--pretty=%H', "#{oldrev}^..#{newrev}"], &:read).lines.map(&:strip) + revisions = IO.popen(['git', 'log', '--no-show-signature', '--reverse', '--pretty=%H', "#{oldrev}^..#{newrev}"], &:read).lines.map(&:strip) revisions[0..-2].zip(revisions[1..-1]).map do |old, new| GitInfoBuilder.new(repo_path).build(old, new, refname) end From fa883a4de89c40d152c28ee0de83ff05b40059df Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 11 Oct 2025 09:44:52 +0900 Subject: [PATCH 2/4] test_commit_email.rb: Simply use sh `env` on macOS resets DYLD environment variables that are needed to run ruby configured with `--enable-load-relative`. Use simple commands instead, and `/bin/sh` that is specified in POSIX is more portable than `/usr/bin/env`. --- tool/test/test_commit_email.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tool/test/test_commit_email.rb b/tool/test/test_commit_email.rb index efd45022be0bab..b948987ed96411 100644 --- a/tool/test/test_commit_email.rb +++ b/tool/test/test_commit_email.rb @@ -20,12 +20,11 @@ def setup end @sendmail = File.join(Dir.mktmpdir, 'sendmail') - File.write(@sendmail, <<~SENDMAIL) - #!/usr/bin/env ruby - print #{STDIN_DELIMITER.dump} - puts STDIN.read + File.write(@sendmail, <<~SENDMAIL, mode: "wx", perm: 0755) + #!/bin/sh + echo #{STDIN_DELIMITER.chomp.dump} + exec cat SENDMAIL - FileUtils.chmod(0755, @sendmail) @commit_email = File.expand_path('../../tool/commit-email.rb', __dir__) end From e500265b099df21768c28890c77fade4b60da068 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 11 Oct 2025 09:56:42 +0900 Subject: [PATCH 3/4] commit-email.rb: Suppress warnings * assigned but unused variable * literal string will be frozen in the future --- tool/commit-email.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tool/commit-email.rb b/tool/commit-email.rb index 2381a74debde45..c887f8783e9d30 100755 --- a/tool/commit-email.rb +++ b/tool/commit-email.rb @@ -211,7 +211,7 @@ def b_encode(str) end def make_body(info, viewer_uri:) - body = '' + body = +'' body << "#{info.author}\t#{format_time(info.date)}\n" body << "\n" body << " New Revision: #{info.revision}\n" @@ -276,7 +276,6 @@ def modified_dirs(info) end def changed_dirs_info(info, uri) - rev = info.revision (info.added_dirs.collect do |dir| " Added: #{dir}\n" end + info.deleted_dirs.collect do |dir| @@ -293,14 +292,11 @@ def diff_info(info, uri) values.collect do |type, value| case type when :added - command = 'cat' rev = "?revision=#{info.revision}&view=markup" when :modified, :property_changed - command = 'diff' prev_revision = (info.revision.is_a?(Integer) ? info.revision - 1 : "#{info.revision}^") rev = "?r1=#{info.revision}&r2=#{prev_revision}&diff_format=u" when :deleted, :copied - command = 'cat' rev = '' else raise "unknown diff type: #{value[:type]}" @@ -328,7 +324,7 @@ def make_header(to, from, info) end def make_subject(info) - subject = '' + subject = +'' subject << "#{info.revision}" subject << " (#{info.branch})" subject << ': ' From e8f0e1423b6c6bf2a02791d28ed149eb892a27be Mon Sep 17 00:00:00 2001 From: Bilka Date: Wed, 8 Oct 2025 14:18:11 +0200 Subject: [PATCH 4/4] [DOC] Fix typo in Regexp Optimization section --- doc/_regexp.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/_regexp.rdoc b/doc/_regexp.rdoc index b862c9a49e0594..76ac3a859e5b15 100644 --- a/doc/_regexp.rdoc +++ b/doc/_regexp.rdoc @@ -1251,7 +1251,7 @@ the potential vulnerability arising from this is the {regular expression denial- \Regexp matching can apply an optimization to prevent ReDoS attacks. When the optimization is applied, matching time increases linearly (not polynomially or exponentially) -in relation to the input size, and a ReDoS attach is not possible. +in relation to the input size, and a ReDoS attack is not possible. This optimization is applied if the pattern meets these criteria: