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
Tatuya Kamada
gitlab-ce
Commits
4ac0160a
Commit
4ac0160a
authored
Jun 20, 2012
by
randx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hande error with huge commits
parent
c7542eb8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
33 deletions
+40
-33
app/controllers/commits_controller.rb
app/controllers/commits_controller.rb
+2
-0
app/views/commits/_commit_box.html.haml
app/views/commits/_commit_box.html.haml
+34
-0
app/views/commits/huge_commit.html.haml
app/views/commits/huge_commit.html.haml
+3
-0
app/views/commits/show.html.haml
app/views/commits/show.html.haml
+1
-33
No files found.
app/controllers/commits_controller.rb
View file @
4ac0160a
...
@@ -41,6 +41,8 @@ class CommitsController < ApplicationController
...
@@ -41,6 +41,8 @@ class CommitsController < ApplicationController
if
@commit
.
diffs
.
size
>
200
&&
!
params
[
:force_show_diff
]
if
@commit
.
diffs
.
size
>
200
&&
!
params
[
:force_show_diff
]
@suppress_diff
=
true
@suppress_diff
=
true
end
end
rescue
Grit
::
Git
::
GitTimeout
render
"huge_commit"
end
end
def
compare
def
compare
...
...
app/views/commits/_commit_box.html.haml
0 → 100644
View file @
4ac0160a
.commit-box
{
class:
@commit
.
parents
.
count
>
1
?
"merge-commit"
:
""
}
.commit-head
=
link_to
"Browse Code »"
,
tree_project_ref_path
(
@project
,
@commit
.
id
),
:class
=>
"browse-button"
%h3
.commit-title
=
commit_msg_with_link_to_issues
(
@project
,
@commit
.
title
)
-
if
@commit
.
description
.
present?
%pre
.commit-description
=
commit_msg_with_link_to_issues
(
@project
,
@commit
.
description
)
.commit-info
.row
.span4
=
image_tag
gravatar_icon
(
@commit
.
author_email
,
40
),
:class
=>
"avatar"
.author
%strong
=
@commit
.
author_name
authored
%time
{
title:
@commit
.
authored_date
.
stamp
(
"Aug 21, 2011 9:23pm"
)}
#{
time_ago_in_words
(
@commit
.
authored_date
)
}
ago
-
if
@commit
.
different_committer?
.committer
→
%strong
=
@commit
.
committer_name
committed
%time
{
title:
@commit
.
committed_date
.
stamp
(
"Aug 21, 2011 9:23pm"
)}
#{
time_ago_in_words
(
@commit
.
committed_date
)
}
ago
.span7.right
.sha-block
%span
.cgray
commit
%code
=
@commit
.
id
.sha-block
%span
.cgray
=
pluralize
(
@commit
.
parents
.
count
,
"parent"
)
-
@commit
.
parents
.
each
do
|
parent
|
=
link_to
parent
.
id
[
0
...
10
],
project_commit_path
(
@project
,
parent
)
app/views/commits/huge_commit.html.haml
0 → 100644
View file @
4ac0160a
=
render
"commits/commit_box"
.alert-message.block-message.error
%h4
Commit diffs are too big to be displayed
app/views/commits/show.html.haml
View file @
4ac0160a
.commit-box
{
class:
@commit
.
parents
.
count
>
1
?
"merge-commit"
:
""
}
=
render
"commits/commit_box"
.commit-head
=
link_to
"Browse Code »"
,
tree_project_ref_path
(
@project
,
@commit
.
id
),
:class
=>
"browse-button"
%h3
.commit-title
=
commit_msg_with_link_to_issues
(
@project
,
@commit
.
title
)
-
if
@commit
.
description
.
present?
%pre
.commit-description
=
commit_msg_with_link_to_issues
(
@project
,
@commit
.
description
)
.commit-info
.row
.span4
=
image_tag
gravatar_icon
(
@commit
.
author_email
,
40
),
:class
=>
"avatar"
.author
%strong
=
@commit
.
author_name
authored
%time
{
title:
@commit
.
authored_date
.
stamp
(
"Aug 21, 2011 9:23pm"
)}
#{
time_ago_in_words
(
@commit
.
authored_date
)
}
ago
-
if
@commit
.
different_committer?
.committer
→
%strong
=
@commit
.
committer_name
committed
%time
{
title:
@commit
.
committed_date
.
stamp
(
"Aug 21, 2011 9:23pm"
)}
#{
time_ago_in_words
(
@commit
.
committed_date
)
}
ago
.span7.right
.sha-block
%span
.cgray
commit
%code
=
@commit
.
id
.sha-block
%span
.cgray
=
pluralize
(
@commit
.
parents
.
count
,
"parent"
)
-
@commit
.
parents
.
each
do
|
parent
|
=
link_to
parent
.
id
[
0
...
10
],
project_commit_path
(
@project
,
parent
)
=
render
"commits/diffs"
,
:diffs
=>
@commit
.
diffs
=
render
"commits/diffs"
,
:diffs
=>
@commit
.
diffs
=
render
"notes/notes"
,
:tid
=>
@commit
.
id
,
:tt
=>
"commit"
=
render
"notes/notes"
,
:tid
=>
@commit
.
id
,
:tt
=>
"commit"
=
render
"notes/per_line_form"
=
render
"notes/per_line_form"
...
...
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