Skip to content

Commit d1a5e22

Browse files
committed
Drop unused --from option
1 parent 2aaedd3 commit d1a5e22

File tree

2 files changed

+5
-18
lines changed

2 files changed

+5
-18
lines changed

bin/commit-email.rb

+4-16
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ class << CommitEmail
153153
def parse(args)
154154
options = OpenStruct.new
155155
options.error_to = []
156-
options.from = nil
157156
options.repository_uri = nil
158157
options.rss_path = nil
159158
options.rss_uri = nil
@@ -168,11 +167,6 @@ def parse(args)
168167
options.error_to << to unless to.nil?
169168
end
170169

171-
opts.on('-f', '--from [FROM]',
172-
'Use [FROM] as from address') do |from|
173-
options.from = from
174-
end
175-
176170
opts.on('--viewer-uri [URI]',
177171
'Use [URI] as URI of revision viewer') do |uri|
178172
options.viewer_uri = uri
@@ -220,7 +214,7 @@ def main(repo_path, to, rest)
220214
infos.each do |info|
221215
puts "#{info.branches.join(', ')}: #{info.revision} (#{info.author})"
222216

223-
from = options.from || info.author_email
217+
from = info.author_email
224218
sendmail(to, from, make_mail(to, from, info, viewer_uri: options.viewer_uri))
225219

226220
if options.repository_uri and
@@ -473,15 +467,9 @@ def rss_items(items, info, repos_uri)
473467
rescue StandardError => e
474468
$stderr.puts "#{e.class}: #{e.message}"
475469
$stderr.puts e.backtrace
476-
from = ENV["USER"]
477-
begin
478-
_, options = CommitEmail.parse(rest)
479-
from = options.from
480-
rescue StandardError
481-
end
482-
CommitEmail.sendmail(to, from, <<-MAIL)
483-
From: #{from}
484-
To: #{to.join(', ')}
470+
CommitEmail.sendmail(to, to, <<-MAIL)
471+
From: #{to}
472+
To: #{to}
485473
Subject: Error
486474
487475
#{$!.class}: #{$!.message}

hooks/post-receive-pre.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ log "args: $*"
2929
# -r https://svn.ruby-lang.org/repos/ruby \
3030
# --rss-path /tmp/ruby.rdf \
3131
# --rss-uri https://svn.ruby-lang.org/rss/ruby.rdf \
32-
# --error-to [email protected] \
33-
# --vcs git
32+
# --error-to [email protected]
3433

3534
log "==> redmine fetch changesets"
3635
curl -s "https://bugs.ruby-lang.org/sys/fetch_changesets?key=`cat ~git/config/redmine.key`" &

0 commit comments

Comments
 (0)