diff options
author | Adam Niedzielski <adamsunday@gmail.com> | 2017-02-02 15:41:23 +0100 |
---|---|---|
committer | Adam Niedzielski <adamsunday@gmail.com> | 2017-02-02 15:41:52 +0100 |
commit | 6e04c5ca4f67de5fd14aa4c8c5ed27e9bc0f5846 (patch) | |
tree | d00cf3ac0d7c53d89b7918be7510b6ae334c9469 | |
parent | 79c094fa1fbbc0306e24b9ca356bd4a57a030d5b (diff) | |
download | gitlab-ce-glensc/gitlab-ce-17325-rugged-gem-update.tar.gz |
Use Rugged::SORT_NONE instead of Rugged::SORT_DATEglensc/gitlab-ce-17325-rugged-gem-update
Meaning of SORT_DATE was changed in libgit2.
See https://github.com/libgit2/libgit2/commit/82d4c0e6b841ae0e466bd97ab1faec0920a6b7a2
SORT_NONE is the order produced by "git log".
-rw-r--r-- | lib/gitlab/git/repository.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb index 10602a9780d..76cd2e96487 100644 --- a/lib/gitlab/git/repository.rb +++ b/lib/gitlab/git/repository.rb @@ -322,7 +322,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] } @@ -366,7 +366,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) @@ -444,7 +444,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 = [] |