Commit c7d69d31f97de3386a1aab4c87f4b82d3527ce8b
- Date: Wed Feb 06 20:05:36 +0000 2008
- Committer: Johan Sørensen (johan@johansorensen.com)
- Author: Johan Sørensen (johan@johansorensen.com)
- Commit SHA1: c7d69d31f97de3386a1aab4c87f4b82d3527ce8b
- Tree SHA1: d4c39df8670e92045f7c663412a4836b414b17d2
- Clean up commit formatting a wee bit
- use Gitto in (Comments|Repositories)Controller as well
Commit diff
| |   |
| 13 | 13 | end |
| 14 | 14 | |
| 15 | 15 | def commit |
| 16 | | @git = Git.bare(@repository.full_repository_path) |
| 17 | | @commit = @git.gcommit(params[:sha]) |
| 16 | @git = Gitorious::Gitto.new(@repository.full_repository_path) |
| 17 | @commit = @git.commit(params[:sha]) |
| 18 | 18 | @comments = @repository.comments.find_all_by_sha1(params[:sha], :include => :user) |
| 19 | 19 | end |
| 20 | 20 | |
| toggle raw diff |
--- a/app/controllers/comments_controller.rb
+++ b/app/controllers/comments_controller.rb
@@ -13,8 +13,8 @@ class CommentsController < ApplicationController
end
def commit
- @git = Git.bare(@repository.full_repository_path)
- @commit = @git.gcommit(params[:sha])
+ @git = Gitorious::Gitto.new(@repository.full_repository_path)
+ @commit = @git.commit(params[:sha])
@comments = @repository.comments.find_all_by_sha1(params[:sha], :include => :user)
end
|
| |   |
| 13 | 13 | @repository = @project.repositories.find_by_name!(params[:id]) |
| 14 | 14 | @comment_count = @repository.comments.count |
| 15 | 15 | if @repository.has_commits? |
| 16 | | @commits = Git.bare(@repository.full_repository_path).log(10) |
| 16 | @commits = Gitorious::Gitto.new(@repository.full_repository_path).log(10) |
| 17 | 17 | else |
| 18 | 18 | @commits = [] |
| 19 | 19 | end |
| toggle raw diff |
--- a/app/controllers/repositories_controller.rb
+++ b/app/controllers/repositories_controller.rb
@@ -13,7 +13,7 @@ class RepositoriesController < ApplicationController
@repository = @project.repositories.find_by_name!(params[:id])
@comment_count = @repository.comments.count
if @repository.has_commits?
- @commits = Git.bare(@repository.full_repository_path).log(10)
+ @commits = Gitorious::Gitto.new(@repository.full_repository_path).log(10)
else
@commits = []
end |
| |   |
| 2 | 2 | |
| 3 | 3 | <h1>Commit <%=h @commit.sha -%></h1> |
| 4 | 4 | |
| 5 | | <p><pre><%=h @commit.message -%></pre></p> |
| 6 | | |
| 5 | <div class="commit_message"><%= simple_format(h(@commit.message)) -%></div> |
| 7 | 6 | <%= render :partial => "commit_infobox" -%> |
| 8 | 7 | |
| 9 | 8 | <ul class="tab_menu"> |
| toggle raw diff |
--- a/app/views/browse/commit.html.erb
+++ b/app/views/browse/commit.html.erb
@@ -2,8 +2,7 @@
<h1>Commit <%=h @commit.sha -%></h1>
-<p><pre><%=h @commit.message -%></pre></p>
-
+<div class="commit_message"><%= simple_format(h(@commit.message)) -%></div>
<%= render :partial => "commit_infobox" -%>
<ul class="tab_menu"> |
| |   |
| 28 | 28 | <li class="commit_item"> |
| 29 | 29 | <a href=""><%= link_to truncate(h(commit.sha), 16), |
| 30 | 30 | project_repository_commit_path(@project, @repository, commit.sha) -%></a> |
| 31 | | by <strong><%=h commit.author.name -%></strong> <%=h time_ago_in_words(commit.author.date) -%> ago<br /> |
| 32 | | <pre class="commit_message"><%= word_wrap(h(commit.message)) -%></pre> |
| 31 | by <strong><%=h commit.author.name -%></strong> <%=h time_ago_in_words(commit.author.date) -%> ago |
| 32 | <div class="commit_message"><%= simple_format(h(commit.message)) -%></div> |
| 33 | 33 | </li> |
| 34 | 34 | <% end -%> |
| 35 | 35 | </ul> |
| toggle raw diff |
--- a/app/views/repositories/show.html.erb
+++ b/app/views/repositories/show.html.erb
@@ -28,8 +28,8 @@
<li class="commit_item">
<a href=""><%= link_to truncate(h(commit.sha), 16),
project_repository_commit_path(@project, @repository, commit.sha) -%></a>
- by <strong><%=h commit.author.name -%></strong> <%=h time_ago_in_words(commit.author.date) -%> ago<br />
- <pre class="commit_message"><%= word_wrap(h(commit.message)) -%></pre>
+ by <strong><%=h commit.author.name -%></strong> <%=h time_ago_in_words(commit.author.date) -%> ago
+ <div class="commit_message"><%= simple_format(h(commit.message)) -%></div>
</li>
<% end -%>
</ul> |
| |   |
| 403 | 403 | margin-bottom: 0.2em; |
| 404 | 404 | } |
| 405 | 405 | |
| 406 | | pre.commit_message { |
| 406 | .commit_message, .commit_message p { |
| 407 | 407 | margin-top: 10px; |
| 408 | 408 | margin-left: 10px; |
| 409 | font: 95%/105% "Bitstream Vera Sans Mono", Monaco, "Courier New", Courier, monospace; |
| 409 | 410 | } |
| 410 | 411 | |
| 411 | 412 | ul.project_list li { |
| toggle raw diff |
--- a/public/stylesheets/base.css
+++ b/public/stylesheets/base.css
@@ -403,9 +403,10 @@ table.repository_list tr.clone td.name {
margin-bottom: 0.2em;
}
-pre.commit_message {
+.commit_message, .commit_message p {
margin-top: 10px;
margin-left: 10px;
+ font: 95%/105% "Bitstream Vera Sans Mono", Monaco, "Courier New", Courier, monospace;
}
ul.project_list li { |