changeset 1554:e5c9809534a2 feature_1136

Further fix to that
author Chris Cannam
date Wed, 13 Jan 2016 11:43:59 +0000
parents baac54711ee9
children 1786830cc35d
files extra/soundsoftware/create-repo-authormaps.rb
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/extra/soundsoftware/create-repo-authormaps.rb	Wed Jan 13 11:19:42 2016 +0000
+++ b/extra/soundsoftware/create-repo-authormaps.rb	Wed Jan 13 11:43:59 2016 +0000
@@ -105,11 +105,11 @@
     #
     if c =~ /<.*</ then
       # So this is a completely pathological case
-      c = c.sub(/\s*<.*$/, "")
       user = User.find_by_id uid
       if user.nil? then
         # because the given committer is bogus, we must write something in the map
-        authormap << "#{c}=#{user.name} <unknown@example.com>\n"
+        name = c.sub(/\s*<.*$/, "")
+        authormap << "#{c}=#{name} <unknown@example.com>\n"
       else
         authormap << "#{c}=#{user.name} <#{user.mail}>\n"
       end