summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2025-10-11 09:44:32 +0900
committerNobuyoshi Nakada <nobu.nakada@gmail.com>2025-10-11 11:01:56 +0900
commitb868beea10096df8e54c8b1175659f491a0b03dd (patch)
tree596348a3f767cd30781193bd7f895d52c155c203
parent07b59eee6aa120537d7d72422327cc7b855e9400 (diff)
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`.
-rwxr-xr-xtool/commit-email.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/tool/commit-email.rb b/tool/commit-email.rb
index f738261dcc..2381a74deb 100755
--- a/tool/commit-email.rb
+++ b/tool/commit-email.rb
@@ -121,7 +121,7 @@ class GitInfoBuilder
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 @@ class << CommitEmail
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