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
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-11-06 13:51:44 +0300
committerPhil Hughes <me@iamphill.com>2017-11-06 13:52:04 +0300
commitbd5ea484952e3ee4c50b7ffeaa20801696222ed2 (patch)
tree3c47c431d2424d0f3421b6cf8fe10bce0fe284e6 /app/controllers/projects/refs_controller.rb
parenteacd821a3c0bae80a56a6933d5ab6aea4b9f283e (diff)
fixed karma test
updated controller based on review
Diffstat (limited to 'app/controllers/projects/refs_controller.rb')
-rw-r--r--app/controllers/projects/refs_controller.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/projects/refs_controller.rb b/app/controllers/projects/refs_controller.rb
index 82f7ccb6afa..2376f469213 100644
--- a/app/controllers/projects/refs_controller.rb
+++ b/app/controllers/projects/refs_controller.rb
@@ -56,11 +56,12 @@ class Projects::RefsController < Projects::ApplicationController
contents[@offset, @limit].to_a.map do |content|
file = @path ? File.join(@path, content.name) : content.name
last_commit = @repo.last_commit_for_path(@commit.id, file)
+ commit_path = project_commit_path(@project, last_commit) if last_commit
{
file_name: content.name,
commit: last_commit,
type: content.type,
- commit_path: (project_commit_path(@project, last_commit) unless last_commit.nil?)
+ commit_path: commit_path
}
end
end