class RepositoryMerger::CommitHistoryMerger::OriginalCommitQueue

Attributes

references[R]

Public Class Methods

new(references) click to toggle source
# File lib/repository_merger/commit_history_merger.rb, line 133
def initialize(references)
  @references = references
end

Public Instance Methods

commit_queues() click to toggle source
# File lib/repository_merger/commit_history_merger.rb, line 146
def commit_queues
  @commit_queues ||= references.map(&:topologically_ordered_commits_from_root).map(&:dup)
end
next() click to toggle source
# File lib/repository_merger/commit_history_merger.rb, line 137
def next
  queue_having_earliest_commit = commit_queues.reject(&:empty?).min_by { |queue| queue.first.commit_time }
  queue_having_earliest_commit&.shift
end
size() click to toggle source
# File lib/repository_merger/commit_history_merger.rb, line 142
def size
  commit_queues.sum(&:size)
end