Commit c62715acc920f92ce2f3febf4dc3f838e3097410

Authored by Saito
1 parent 34cc38b6

now render the correct authorname and message

config/initializers/gitlabhq/20_grit_ext.rb
@@ -13,27 +13,6 @@ Grit::Blob.class_eval do @@ -13,27 +13,6 @@ Grit::Blob.class_eval do
13 end 13 end
14 end 14 end
15 15
16 -Grit::Commit.class_eval do  
17 - def to_hash  
18 - {  
19 - 'id' => id,  
20 - 'parents' => parents.map { |p| { 'id' => p.id } },  
21 - 'tree' => tree.id,  
22 - 'message' => Gitlab::Encode.utf8(message),  
23 - 'author' => {  
24 - 'name' => Gitlab::Encode.utf8(author.name),  
25 - 'email' => author.email  
26 - },  
27 - 'committer' => {  
28 - 'name' => Gitlab::Encode.utf8(committer.name),  
29 - 'email' => committer.email  
30 - },  
31 - 'authored_date' => authored_date.xmlschema,  
32 - 'committed_date' => committed_date.xmlschema,  
33 - }  
34 - end  
35 -end  
36 -  
37 Grit::Diff.class_eval do 16 Grit::Diff.class_eval do
38 def old_path 17 def old_path
39 Gitlab::Encode.utf8 @a_path 18 Gitlab::Encode.utf8 @a_path
lib/graph_commit.rb
@@ -96,13 +96,13 @@ class GraphCommit @@ -96,13 +96,13 @@ class GraphCommit
96 h[:parents] = self.parents.collect do |p| 96 h[:parents] = self.parents.collect do |p|
97 [p.id,0,0] 97 [p.id,0,0]
98 end 98 end
99 - h[:author] = author.name 99 + h[:author] = Gitlab::Encode.utf8(author.name)
100 h[:time] = time 100 h[:time] = time
101 h[:space] = space 101 h[:space] = space
102 h[:refs] = refs.collect{|r|r.name}.join(" ") unless refs.nil? 102 h[:refs] = refs.collect{|r|r.name}.join(" ") unless refs.nil?
103 h[:id] = sha 103 h[:id] = sha
104 h[:date] = date 104 h[:date] = date
105 - h[:message] = message 105 + h[:message] = Gitlab::Encode.utf8(message)
106 h[:login] = author.email 106 h[:login] = author.email
107 h 107 h
108 end 108 end