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>2020-03-31 15:08:09 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-31 15:08:09 +0300
commit0d0cddc9ce20c5a7d8a2723d0aa620ca184a711a (patch)
tree64f91b4d4ca74aa09d2a62ac5910820d087ed7cb /lib/gitlab/git
parent6044caed20964a70c1ac6c5a3365d567ed96dfde (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/git')
-rw-r--r--lib/gitlab/git/commit.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/gitlab/git/commit.rb b/lib/gitlab/git/commit.rb
index 0b999197cd8..605084f1ec2 100644
--- a/lib/gitlab/git/commit.rb
+++ b/lib/gitlab/git/commit.rb
@@ -93,12 +93,15 @@ module Gitlab
# Commit.last_for_path(repo, 'master', 'Gemfile')
#
def last_for_path(repo, ref, path = nil)
+ # rubocop: disable Rails/FindBy
+ # This is not where..first from ActiveRecord
where(
repo: repo,
ref: ref,
path: path,
limit: 1
).first
+ # rubocop: enable Rails/FindBy
end
# Get commits between two revspecs