summaryrefslogtreecommitdiff
path: root/app/models/repository.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-13 21:08:59 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-13 21:08:59 +0000
commitd466ee5042520ad078fe050cb078d81dc2ebe196 (patch)
tree5648eb1aee8aeff5b5c5ff4669a184fd7676f778 /app/models/repository.rb
parent6a9d7c009e4e5975a89bcc3e458da4b3ec484bd1 (diff)
downloadgitlab-ce-d466ee5042520ad078fe050cb078d81dc2ebe196.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/repository.rb')
-rw-r--r--app/models/repository.rb12
1 files changed, 2 insertions, 10 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb
index c439d0700f1..37aceeae5f8 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -134,15 +134,6 @@ class Repository
end
end
- # the opts are:
- # - :path
- # - :limit
- # - :offset
- # - :skip_merges
- # - :after
- # - :before
- # - :all
- # - :first_parent
def commits(ref = nil, opts = {})
options = {
repo: raw_repository,
@@ -155,7 +146,8 @@ class Repository
after: opts[:after],
before: opts[:before],
all: !!opts[:all],
- first_parent: !!opts[:first_parent]
+ first_parent: !!opts[:first_parent],
+ order: opts[:order]
}
commits = Gitlab::Git::Commit.where(options)