diff options
author | Robert Speicher <robert@gitlab.com> | 2017-03-28 20:12:23 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2017-03-28 20:12:23 +0000 |
commit | c82ddfe24a1a14596caf2f9ca4a6fdb521942f1c (patch) | |
tree | b51b3dd3cd332bf3e32ea84e0d588c4f2cce53d3 /lib | |
parent | 47aeacd7f5b214d24dcb02bf0a42774415f5083d (diff) | |
parent | 91e150266adeeaa60c8626a3dd1ddc467347744f (diff) | |
download | gitlab-ce-c82ddfe24a1a14596caf2f9ca4a6fdb521942f1c.tar.gz |
Merge branch 'glensc/gitlab-ce-17325-rugged-gem-update' into 'master'
Update rugged to 0.25.1.1
Closes #17325, #14972, and #14765
See merge request !10286
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/git/repository.rb | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb index 2187dd70ff4..057f7748c3e 100644 --- a/lib/gitlab/git/repository.rb +++ b/lib/gitlab/git/repository.rb @@ -320,7 +320,7 @@ module Gitlab def log_by_walk(sha, options) walk_options = { show: sha, - sort: Rugged::SORT_DATE, + sort: Rugged::SORT_NONE, limit: options[:limit], offset: options[:offset] } @@ -382,7 +382,7 @@ module Gitlab # a detailed list of valid arguments. def commits_between(from, to) walker = Rugged::Walker.new(rugged) - walker.sorting(Rugged::SORT_DATE | Rugged::SORT_REVERSE) + walker.sorting(Rugged::SORT_NONE | Rugged::SORT_REVERSE) sha_from = sha_from_ref(from) sha_to = sha_from_ref(to) @@ -460,7 +460,7 @@ module Gitlab if actual_options[:order] == :topo walker.sorting(Rugged::SORT_TOPO) else - walker.sorting(Rugged::SORT_DATE) + walker.sorting(Rugged::SORT_NONE) end commits = [] @@ -828,23 +828,6 @@ module Gitlab Rugged::Commit.create(rugged, actual_options) end - def commits_since(from_date) - walker = Rugged::Walker.new(rugged) - walker.sorting(Rugged::SORT_DATE | Rugged::SORT_REVERSE) - - rugged.references.each("refs/heads/*") do |ref| - walker.push(ref.target_id) - end - - commits = [] - walker.each do |commit| - break if commit.author[:time].to_date < from_date - commits.push(commit) - end - - commits - end - AUTOCRLF_VALUES = { "true" => true, "false" => false, |