Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
c62715ac
Commit
c62715ac
authored
May 30, 2012
by
Saito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
now render the correct authorname and message
parent
34cc38b6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
23 deletions
+2
-23
config/initializers/gitlabhq/20_grit_ext.rb
config/initializers/gitlabhq/20_grit_ext.rb
+0
-21
lib/graph_commit.rb
lib/graph_commit.rb
+2
-2
No files found.
config/initializers/gitlabhq/20_grit_ext.rb
View file @
c62715ac
...
...
@@ -13,27 +13,6 @@ Grit::Blob.class_eval do
end
end
Grit
::
Commit
.
class_eval
do
def
to_hash
{
'id'
=>
id
,
'parents'
=>
parents
.
map
{
|
p
|
{
'id'
=>
p
.
id
}
},
'tree'
=>
tree
.
id
,
'message'
=>
Gitlab
::
Encode
.
utf8
(
message
),
'author'
=>
{
'name'
=>
Gitlab
::
Encode
.
utf8
(
author
.
name
),
'email'
=>
author
.
email
},
'committer'
=>
{
'name'
=>
Gitlab
::
Encode
.
utf8
(
committer
.
name
),
'email'
=>
committer
.
email
},
'authored_date'
=>
authored_date
.
xmlschema
,
'committed_date'
=>
committed_date
.
xmlschema
,
}
end
end
Grit
::
Diff
.
class_eval
do
def
old_path
Gitlab
::
Encode
.
utf8
@a_path
...
...
lib/graph_commit.rb
View file @
c62715ac
...
...
@@ -96,13 +96,13 @@ class GraphCommit
h
[
:parents
]
=
self
.
parents
.
collect
do
|
p
|
[
p
.
id
,
0
,
0
]
end
h
[
:author
]
=
author
.
name
h
[
:author
]
=
Gitlab
::
Encode
.
utf8
(
author
.
name
)
h
[
:time
]
=
time
h
[
:space
]
=
space
h
[
:refs
]
=
refs
.
collect
{
|
r
|
r
.
name
}.
join
(
" "
)
unless
refs
.
nil?
h
[
:id
]
=
sha
h
[
:date
]
=
date
h
[
:message
]
=
message
h
[
:message
]
=
Gitlab
::
Encode
.
utf8
(
message
)
h
[
:login
]
=
author
.
email
h
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment