From 31704680cc967f0a053edc70db828ff780d7d0e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Wed, 2 Nov 2016 00:32:20 +0200 Subject: post_receive: accept any user email from last commit --- lib/gitlab/identifier.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/gitlab/identifier.rb') diff --git a/lib/gitlab/identifier.rb b/lib/gitlab/identifier.rb index f8809db21aa..c5acf18beb5 100644 --- a/lib/gitlab/identifier.rb +++ b/lib/gitlab/identifier.rb @@ -24,7 +24,7 @@ module Gitlab email = commit.author_email identify_with_cache(:email, email) do - User.find_by(email: email) + User.find_by_any_email(email) end end -- cgit v1.2.1 From 9ad2dba250e3facc18ff2f21217ebe006451dd8c Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Thu, 24 Nov 2016 02:33:55 +0800 Subject: Use Commit#author so we share logic and cache Closes #24900 --- lib/gitlab/identifier.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/gitlab/identifier.rb') 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 -- cgit v1.2.1