format.html
format.json do
- @graph = Network::Graph.new(project, @ref, @commit)
+ @graph = Network::Graph.new(project, @ref, @commit, @options[:filter_ref])
end
end
end
@max_count ||= 650
end
- def initialize project, ref, commit
+ def initialize project, ref, commit, filter_ref
@project = project
@ref = ref
@commit = commit
+ @filter_ref = filter_ref
@repo = project.repo
@commits = collect_commits
skip: skip
}
- Grit::Commit.find_all(@repo, nil, opts)
+ ref = @ref if @filter_ref
+
+ Grit::Commit.find_all(@repo, ref, opts)
end
def commits_sort_by_ref