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:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-14 21:06:24 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-14 21:06:24 +0300
commit8c30d396c5a789080345303330069981aa06e4af (patch)
tree6fd96c7c80bec2f1101af34d749ada58e59b38ee /app/models/commit.rb
parent429d1abad29d379d8bc8f5219eb72384ad485deb (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/commit.rb')
-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 }