Commit 46d5760c authored by Jacob Vosmaer's avatar Jacob Vosmaer

Fewer silly instance variables

parent 50a357d7
...@@ -88,17 +88,6 @@ class Projects::GitHttpController < Projects::ApplicationController ...@@ -88,17 +88,6 @@ class Projects::GitHttpController < Projects::ApplicationController
[nil, nil] [nil, nil]
end end
def repository
@repository ||= begin
_, suffix = project_id_with_suffix
if suffix == '.wiki.git'
project.wiki.repository
else
project.repository
end
end
end
def upload_pack? def upload_pack?
git_command == 'git-upload-pack' git_command == 'git-upload-pack'
end end
...@@ -119,6 +108,15 @@ class Projects::GitHttpController < Projects::ApplicationController ...@@ -119,6 +108,15 @@ class Projects::GitHttpController < Projects::ApplicationController
render json: Gitlab::Workhorse.git_http_ok(repository, user) render json: Gitlab::Workhorse.git_http_ok(repository, user)
end end
def repository
_, suffix = project_id_with_suffix
if suffix == '.wiki.git'
project.wiki.repository
else
project.repository
end
end
def render_not_found def render_not_found
render text: 'Not Found', status: :not_found render text: 'Not Found', status: :not_found
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment