diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-08-05 16:51:04 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-08-05 16:51:04 +0300 |
commit | b92655663c9f066de6a67217ad9a55f38e20cffd (patch) | |
tree | 90d1d1959c5f4ae086dddef66bff3118a6d9b239 /app/models/repository.rb | |
parent | d602d5b1b05036788c67c13510c34725c68116ea (diff) | |
download | gitlab-ce-b92655663c9f066de6a67217ad9a55f38e20cffd.tar.gz |
Update main calls to gitlab_git
Diffstat (limited to 'app/models/repository.rb')
-rw-r--r-- | app/models/repository.rb | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index 588cabfbae0..cd33782a4cc 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -18,19 +18,25 @@ class Repository end def commit(id = nil) - commit = raw_repository.commit(id) + commit = Gitlab::Git::Commit.find(raw_repository, id) commit = Commit.new(commit) if commit commit end def commits(ref, path = nil, limit = nil, offset = nil) - commits = raw_repository.commits(ref, path, limit, offset) + commits = Gitlab::Git::Commit.where( + repo: raw_repository, + ref: ref, + path: path, + limit: limit, + offset: offset, + ) commits = Commit.decorate(commits) if commits.present? commits end - def commits_between(target, source) - commits = raw_repository.commits_between(target, source) + def commits_between(from, to) + commits = Gitlab::Git::Commit.between(raw_repository, from, to) commits = Commit.decorate(commits) if commits.present? commits end |