summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-14 18:06:24 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-14 18:06:24 +0000
commit8c30d396c5a789080345303330069981aa06e4af (patch)
tree6fd96c7c80bec2f1101af34d749ada58e59b38ee /app/models
parent429d1abad29d379d8bc8f5219eb72384ad485deb (diff)
downloadgitlab-ce-8c30d396c5a789080345303330069981aa06e4af.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models')
-rw-r--r--app/models/commit.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb
index 57069280ef7..aae49c36899 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -257,10 +257,9 @@ class Commit
end
def author
- # We use __sync so that we get the actual objects back (including an actual
- # nil), instead of a wrapper, as returning a wrapped nil breaks a lot of
- # code.
- lazy_author.__sync
+ strong_memoize(:author) do
+ lazy_author&.itself
+ end
end
request_cache(:author) { author_email.downcase }