diff --git a/lib/gaucho/pageset.rb b/lib/gaucho/pageset.rb index b8b6175..4244f41 100644 --- a/lib/gaucho/pageset.rb +++ b/lib/gaucho/pageset.rb @@ -105,22 +105,14 @@ def abs_subdir_path end end - # Sort commits. TODO: REMOVE? - def sort_commits(shas) - shas.sort {|a, b| @commit_order[a].to_i <=> @commit_order[b].to_i} - end - protected # Build commit index for this repo. def build_commit_index return if @commits_by_page - @commit_order = {} @commits_by_page = {} - current_id = nil - idx = 0 log = repo.git.native(:log, {pretty: 'oneline', name_only: true, reverse: true, timeout: false}) @@ -128,7 +120,6 @@ def build_commit_index log.split("\n").each do |line| if line =~ /^([0-9a-f]{40})/ current_id = $1 - @commit_order[current_id] = idx += 1 else if line =~ %r{^#{subdir_path}(.*?)/} @commits_by_page[$1] ||= []