Skip to content

Commit e500265

Browse files
committed
commit-email.rb: Suppress warnings
* assigned but unused variable * literal string will be frozen in the future
1 parent fa883a4 commit e500265

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

tool/commit-email.rb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def b_encode(str)
211211
end
212212

213213
def make_body(info, viewer_uri:)
214-
body = ''
214+
body = +''
215215
body << "#{info.author}\t#{format_time(info.date)}\n"
216216
body << "\n"
217217
body << " New Revision: #{info.revision}\n"
@@ -276,7 +276,6 @@ def modified_dirs(info)
276276
end
277277

278278
def changed_dirs_info(info, uri)
279-
rev = info.revision
280279
(info.added_dirs.collect do |dir|
281280
" Added: #{dir}\n"
282281
end + info.deleted_dirs.collect do |dir|
@@ -293,14 +292,11 @@ def diff_info(info, uri)
293292
values.collect do |type, value|
294293
case type
295294
when :added
296-
command = 'cat'
297295
rev = "?revision=#{info.revision}&view=markup"
298296
when :modified, :property_changed
299-
command = 'diff'
300297
prev_revision = (info.revision.is_a?(Integer) ? info.revision - 1 : "#{info.revision}^")
301298
rev = "?r1=#{info.revision}&r2=#{prev_revision}&diff_format=u"
302299
when :deleted, :copied
303-
command = 'cat'
304300
rev = ''
305301
else
306302
raise "unknown diff type: #{value[:type]}"
@@ -328,7 +324,7 @@ def make_header(to, from, info)
328324
end
329325

330326
def make_subject(info)
331-
subject = ''
327+
subject = +''
332328
subject << "#{info.revision}"
333329
subject << " (#{info.branch})"
334330
subject << ': '

0 commit comments

Comments
 (0)