Commit 3a4c1c5c63f625e6e6075d384a85c67c3992ffb7
1 parent
c0e3b397
Exists in
master
and in
4 other branches
Enable to filter graph by ref
Showing
2 changed files
with
6 additions
and
3 deletions
Show diff stats
app/controllers/graph_controller.rb
app/models/network/graph.rb
... | ... | @@ -8,10 +8,11 @@ module Network |
8 | 8 | @max_count ||= 650 |
9 | 9 | end |
10 | 10 | |
11 | - def initialize project, ref, commit | |
11 | + def initialize project, ref, commit, filter_ref | |
12 | 12 | @project = project |
13 | 13 | @ref = ref |
14 | 14 | @commit = commit |
15 | + @filter_ref = filter_ref | |
15 | 16 | @repo = project.repo |
16 | 17 | |
17 | 18 | @commits = collect_commits |
... | ... | @@ -107,7 +108,9 @@ module Network |
107 | 108 | skip: skip |
108 | 109 | } |
109 | 110 | |
110 | - Grit::Commit.find_all(@repo, nil, opts) | |
111 | + ref = @ref if @filter_ref | |
112 | + | |
113 | + Grit::Commit.find_all(@repo, ref, opts) | |
111 | 114 | end |
112 | 115 | |
113 | 116 | def commits_sort_by_ref | ... | ... |