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
34c97a31
Commit
34c97a31
authored
Aug 12, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Increase commit title limit at Commit#show so it does not truncate most of Merge messages
parent
9711acc9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
app/models/commit.rb
app/models/commit.rb
+6
-6
No files found.
app/models/commit.rb
View file @
34c97a31
...
...
@@ -36,16 +36,16 @@ class Commit
# Returns the commits title.
#
# Usually, the commit title is the first line of the commit message.
# In case this first line is longer than
8
0 characters, it is cut off
# after
7
0 characters and ellipses (`&hellp;`) are appended.
# In case this first line is longer than
10
0 characters, it is cut off
# after
8
0 characters and ellipses (`&hellp;`) are appended.
def
title
title
=
safe_message
return
no_commit_message
if
title
.
blank?
title_end
=
title
.
index
(
/\n/
)
if
(
!
title_end
&&
title
.
length
>
80
)
||
(
title_end
&&
title_end
>
8
0
)
title
[
0
..
6
9
]
<<
"…"
.
html_safe
if
(
!
title_end
&&
title
.
length
>
100
)
||
(
title_end
&&
title_end
>
10
0
)
title
[
0
..
7
9
]
<<
"…"
.
html_safe
else
title
.
split
(
/\n/
,
2
).
first
end
...
...
@@ -58,8 +58,8 @@ class Commit
description
=
safe_message
title_end
=
description
.
index
(
/\n/
)
if
(
!
title_end
&&
description
.
length
>
80
)
||
(
title_end
&&
title_end
>
8
0
)
"…"
.
html_safe
<<
description
[
7
0
..-
1
]
if
(
!
title_end
&&
description
.
length
>
100
)
||
(
title_end
&&
title_end
>
10
0
)
"…"
.
html_safe
<<
description
[
8
0
..-
1
]
else
description
.
split
(
/\n/
,
2
)[
1
].
try
(
:chomp
)
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