Commit 91e15026 authored by Adam Niedzielski's avatar Adam Niedzielski

Use Rugged::SORT_NONE instead of Rugged::SORT_DATE

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".
parent e396b437
......@@ -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 = []
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment