diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-04-06 17:52:12 +0200 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-04-06 17:52:12 +0200 |
commit | 91226c200151461b21e85cc8c85a103c93d6a17f (patch) | |
tree | ff94dfc45087e51a4753a58f6a1286f6f273c27a /app | |
parent | 6cc6d9730a234c2cc27869f9b9388ab61de9c460 (diff) | |
download | gitlab-ce-91226c200151461b21e85cc8c85a103c93d6a17f.tar.gz |
Move workhorse protocol code into lib
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/projects/git_http_controller.rb | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/app/controllers/projects/git_http_controller.rb b/app/controllers/projects/git_http_controller.rb index a26ab736115..6dd7a683b0e 100644 --- a/app/controllers/projects/git_http_controller.rb +++ b/app/controllers/projects/git_http_controller.rb @@ -115,12 +115,12 @@ class Projects::GitHttpController < Projects::ApplicationController end end - def repo_path - @repo_path ||= begin + def repository + @repository ||= begin if params[:project_id].end_with?('.wiki.git') - project.wiki.wiki.path + project.wiki.repository else - repository.path_to_repo + project.repository end end end @@ -142,10 +142,7 @@ class Projects::GitHttpController < Projects::ApplicationController end def render_ok - render json: { - 'GL_ID' => Gitlab::ShellEnv.gl_id(@user), - 'RepoPath' => repo_path, - } + render json: Gitlab::Workhorse.git_http_ok(repository, user) end def render_not_found |