Skip to content

Commit afd8c97

Browse files
committed
Stop taking care of multiple branches for SVN
1 parent 1d14a31 commit afd8c97

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

bin/commit-email.rb

+4-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
:entire_sha256,
1212
:date,
1313
:log,
14-
:branches,
14+
:branch,
1515
:diffs,
1616
:added_files, :deleted_files, :updated_files,
1717
:added_dirs, :deleted_dirs, :updated_dirs,
@@ -34,7 +34,7 @@ def build(oldrev, newrev, refname)
3434
info.entire_sha256 = newrev
3535
info.date = Time.at(Integer(git_show(newrev, format: '%at')))
3636
info.log = git_show(newrev, format: '%B')
37-
info.branches = [git('rev-parse', '--symbolic', '--abbrev-ref', refname).strip]
37+
info.branch = git('rev-parse', '--symbolic', '--abbrev-ref', refname).strip
3838
info.diffs = diffs
3939
info.added_files = find_files(diffs, status: :added)
4040
info.deleted_files = find_files(diffs, status: :deleted)
@@ -188,7 +188,7 @@ def main(repo_path, to, rest)
188188
end
189189

190190
infos.each do |info|
191-
puts "#{info.branches.join(', ')}: #{info.revision} (#{info.author})"
191+
puts "#{info.branch}: #{info.revision} (#{info.author})"
192192

193193
from = info.author_email
194194
sendmail(to, from, make_mail(to, from, info, viewer_uri: options.viewer_uri))
@@ -329,11 +329,10 @@ def make_header(to, from, info)
329329
end
330330

331331
def make_subject(info)
332-
branches = info.branches
333332
subject = ''
334333
subject << "#{info.author}:"
335334
subject << " #{info.revision}"
336-
subject << " (#{branches.join(', ')})" unless branches.empty?
335+
subject << " (#{info.branch})"
337336
subject << ': '
338337
subject << info.log.lstrip.lines.first.to_s.strip
339338
NKF.nkf('-WwMq', subject)

0 commit comments

Comments
 (0)