Permalink
Browse files

When showing a commit and its diff display the full commit message.

  • Loading branch information...
1 parent 0e78234 commit 1f06d834bc314aac90f11bbbe8d9a2597cbdca76 @icefox committed Mar 30, 2010
@@ -22,7 +22,7 @@ def print_date(date)
end
def print_short_commit_message(message, length = 50)
- if (message.length < length)
+ if (length < 0 || message.length < length)
message
else
message.slice(0, length) + "..."
@@ -24,7 +24,8 @@
<%= print_date(commit.date) if @commits.count == 1%>
<%= sprintf("%02.0f", commit.date.hour) + ":" + sprintf("%02.0f", commit.date.min) %>
</div>
- <div class="commit_message"><%= link_to h(print_short_commit_message(commit.message, 200)),
+ <div class="commit_message">
+ <%= link_to h(print_short_commit_message(commit.message, @singlecommit ? -1 : 200)),
{:user => @repository.user.username, :repo => @repository.name, :action => 'commit', :sha1 => commit.sha, :controller => 'repositories'} %>
</div>
</div>
@@ -4,7 +4,7 @@
<%= page_heading ("Commit " + @commits.first.sha + " in " + @repository.user.username + "'s " + @repository.name) %>
<%= render(:partial => 'repositorytop.html.erb') %>
<div id="repopage">
-<%= render(:partial => 'commitlist.html.erb') %>
+<%= @singlecommit = true; render(:partial => 'commitlist.html.erb') %>
<pre>
<%=h @commits.first.to_patch %>
</pre>

0 comments on commit 1f06d83

Please sign in to comment.