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:
authorLin Jen-Shin <godfat@godfat.org>2016-11-23 21:33:55 +0300
committerLin Jen-Shin <godfat@godfat.org>2016-11-23 21:33:55 +0300
commit9ad2dba250e3facc18ff2f21217ebe006451dd8c (patch)
treeb609952bf3317067891f0189ef81441fe5cc381a /lib/gitlab/identifier.rb
parent7100b76923fc88667b1bd22b34f0a43323fe84b0 (diff)
Use Commit#author so we share logic and cache
Closes #24900
Diffstat (limited to 'lib/gitlab/identifier.rb')
-rw-r--r--lib/gitlab/identifier.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/gitlab/identifier.rb b/lib/gitlab/identifier.rb
index c5acf18beb5..94678b6ec40 100644
--- a/lib/gitlab/identifier.rb
+++ b/lib/gitlab/identifier.rb
@@ -21,10 +21,8 @@ module Gitlab
return if !commit || !commit.author_email
- email = commit.author_email
-
- identify_with_cache(:email, email) do
- User.find_by_any_email(email)
+ identify_with_cache(:email, commit.author_email) do
+ commit.author
end
end