Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com>2011-10-14 23:43:25 +0400
committerDmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com>2011-10-14 23:43:25 +0400
commit6a2cd2e9f5b93abbdb12c1a2401ff65843912605 (patch)
tree18a1b313e45f568f4ada7fc013363542d5dc581b /app
parent06ba82817602532c50c139e12efbef2a7ed84905 (diff)
Fixed: invalid browse code for commit. Perfomance test added
Diffstat (limited to 'app')
-rw-r--r--app/controllers/projects_controller.rb2
-rw-r--r--app/views/projects/_tree_file.html.haml1
-rw-r--r--app/views/projects/_tree_item.html.haml2
3 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 09856803e78..7dd6eefc313 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -34,6 +34,8 @@ class ProjectsController < ApplicationController
def tree
load_refs # load @branch, @tag & @ref
+
+
@repo = project.repo
if params[:commit_id]
diff --git a/app/views/projects/_tree_file.html.haml b/app/views/projects/_tree_file.html.haml
index 08927fc2aac..3463bfc543f 100644
--- a/app/views/projects/_tree_file.html.haml
+++ b/app/views/projects/_tree_file.html.haml
@@ -3,7 +3,6 @@
.view_file_header
%strong
= name
- -#= file.mime_type
= link_to "raw", blob_project_path(@project, :commit_id => @commit.id, :path => params[:path] ), :class => "right", :target => "_blank"
= link_to "history", project_commits_path(@project, :path => params[:path]), :class => "right", :style => "margin-right:10px;"
%br/
diff --git a/app/views/projects/_tree_item.html.haml b/app/views/projects/_tree_item.html.haml
index 533c1484f7e..9ba33c1ef88 100644
--- a/app/views/projects/_tree_item.html.haml
+++ b/app/views/projects/_tree_item.html.haml
@@ -1,5 +1,5 @@
- file = params[:path] ? File.join(params[:path], content.name) : content.name
-- content_commit = @project.repo.log(@branch, file, :max_count => 1).last
+- content_commit = @project.repo.log(@commit.id, file, :max_count => 1).last
- return unless content_commit
%tr{ :class => "tree-item", :url => tree_file_project_path(@project, @commit.id, file) }
%td.tree-item-file-name