mirror of
https://github.com/ruby/ruby.git
synced 2026-01-27 04:24:23 +00:00
commit-email.rb: Suppress warnings
* assigned but unused variable * literal string will be frozen in the future
This commit is contained in:
parent
fa883a4de8
commit
e500265b09
Notes:
git
2025-10-11 02:02:28 +00:00
@ -211,7 +211,7 @@ class << CommitEmail
|
||||
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 @@ class << CommitEmail
|
||||
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 @@ class << CommitEmail
|
||||
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 @@ class << CommitEmail
|
||||
end
|
||||
|
||||
def make_subject(info)
|
||||
subject = ''
|
||||
subject = +''
|
||||
subject << "#{info.revision}"
|
||||
subject << " (#{info.branch})"
|
||||
subject << ': '
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user