summaryrefslogtreecommitdiff
path: root/app/models/commit.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-07 00:07:51 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-07 00:07:51 +0000
commit4e375367b78bb44bd00957522cd9fc3e6d403fef (patch)
tree059b1ce541e4128bf03683407d7b5bbbc2094ed5 /app/models/commit.rb
parent99ddca0d88f1e4e49d61b1aa9d41b5785528d1dc (diff)
downloadgitlab-ce-4e375367b78bb44bd00957522cd9fc3e6d403fef.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r--app/models/commit.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb
index 95993089426..c683a9aeb76 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -246,7 +246,7 @@ class Commit
def lazy_author
BatchLoader.for(author_email.downcase).batch do |emails, loader|
- users = User.by_any_email(emails).includes(:emails)
+ users = User.by_any_email(emails, confirmed: true).includes(:emails)
emails.each do |email|
user = users.find { |u| u.any_email?(email) }
@@ -263,8 +263,8 @@ class Commit
end
request_cache(:author) { author_email.downcase }
- def committer
- @committer ||= User.find_by_any_email(committer_email)
+ def committer(confirmed: true)
+ @committer ||= User.find_by_any_email(committer_email, confirmed: confirmed)
end
def parents