| 1 |
class CommitsController < ApplicationController |
| 2 |
before_filter :find_project_and_repository |
| 3 |
before_filter :check_repository_for_commits |
| 4 |
|
| 5 |
def index |
| 6 |
redirect_to project_repository_log_path(@project, @repository, @repository.head_candidate.name) |
| 7 |
end |
| 8 |
|
| 9 |
def show |
| 10 |
@diffmode = params[:diffmode] == "sidebyside" ? "sidebyside" : "inline" |
| 11 |
@git = @repository.git |
| 12 |
@commit = @git.commit(params[:id]) |
| 13 |
@diffs = @commit.diffs |
| 14 |
@comment_count = @repository.comments.count(:all, :conditions => {:sha1 => @commit.id}) |
| 15 |
respond_to do |format| |
| 16 |
format.html |
| 17 |
|
| 18 |
end |
| 19 |
end |
| 20 |
|
| 21 |
end |