Commit c62715acc920f92ce2f3febf4dc3f838e3097410
1 parent
34cc38b6
Exists in
master
and in
4 other branches
now render the correct authorname and message
Showing
2 changed files
with
2 additions
and
23 deletions
Show diff stats
config/initializers/gitlabhq/20_grit_ext.rb
... | ... | @@ -13,27 +13,6 @@ Grit::Blob.class_eval do |
13 | 13 | end |
14 | 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 | 16 | Grit::Diff.class_eval do |
38 | 17 | def old_path |
39 | 18 | Gitlab::Encode.utf8 @a_path | ... | ... |
lib/graph_commit.rb
... | ... | @@ -96,13 +96,13 @@ class GraphCommit |
96 | 96 | h[:parents] = self.parents.collect do |p| |
97 | 97 | [p.id,0,0] |
98 | 98 | end |
99 | - h[:author] = author.name | |
99 | + h[:author] = Gitlab::Encode.utf8(author.name) | |
100 | 100 | h[:time] = time |
101 | 101 | h[:space] = space |
102 | 102 | h[:refs] = refs.collect{|r|r.name}.join(" ") unless refs.nil? |
103 | 103 | h[:id] = sha |
104 | 104 | h[:date] = date |
105 | - h[:message] = message | |
105 | + h[:message] = Gitlab::Encode.utf8(message) | |
106 | 106 | h[:login] = author.email |
107 | 107 | h |
108 | 108 | end | ... | ... |