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:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-02-11 21:16:59 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-02-11 21:16:59 +0400
commitd64090b8a9065746c6d532057228c079a1d57013 (patch)
treea97504c15dedfd470d9ffc11c51bd15a6718e8cb /app/workers/post_receive.rb
parent8e0b58d7e7cde0d9afb93f267197f62b9b649cd3 (diff)
No gitolite in project any more
Diffstat (limited to 'app/workers/post_receive.rb')
-rw-r--r--app/workers/post_receive.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/workers/post_receive.rb b/app/workers/post_receive.rb
index 6e2d0e7aba2..e3f62d736ef 100644
--- a/app/workers/post_receive.rb
+++ b/app/workers/post_receive.rb
@@ -5,10 +5,10 @@ class PostReceive
def perform(repo_path, oldrev, newrev, ref, identifier)
- if repo_path.start_with?(Gitlab.config.gitolite.repos_path.to_s)
- repo_path.gsub!(Gitlab.config.gitolite.repos_path.to_s, "")
+ if repo_path.start_with?(Gitlab.config.gitlab_shell.repos_path.to_s)
+ repo_path.gsub!(Gitlab.config.gitlab_shell.repos_path.to_s, "")
else
- Gitlab::GitLogger.error("POST-RECEIVE: Check gitlab.yml config for correct gitolite.repos_path variable. \"#{Gitlab.config.gitolite.repos_path}\" does not match \"#{repo_path}\"")
+ Gitlab::GitLogger.error("POST-RECEIVE: Check gitlab.yml config for correct gitlab_shell.repos_path variable. \"#{Gitlab.config.gitlab_shell.repos_path}\" does not match \"#{repo_path}\"")
end
repo_path.gsub!(/.git$/, "")
@@ -22,7 +22,8 @@ class PostReceive
end
# Ignore push from non-gitlab users
- user = if identifier.eql? Gitlab.config.gitolite.admin_key
+ user = if identifier.nil?
+ raise identifier.inspect
email = project.repository.commit(newrev).author.email rescue nil
User.find_by_email(email) if email
elsif /^[A-Z0-9._%a-z\-]+@(?:[A-Z0-9a-z\-]+\.)+[A-Za-z]{2,4}$/.match(identifier)