Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSato Hiroyuki <sathiroyuki@gmail.com>2013-04-12 12:49:11 +0400
committerSato Hiroyuki <sathiroyuki@gmail.com>2013-05-13 13:44:50 +0400
commit3a4c1c5c63f625e6e6075d384a85c67c3992ffb7 (patch)
tree44ee168201087808e9e085046011d60edd35a28f /app/models/network
parentc0e3b39792cb7ad479af66c07685eb37e654ccb6 (diff)
Enable to filter graph by ref
Diffstat (limited to 'app/models/network')
-rw-r--r--app/models/network/graph.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/models/network/graph.rb b/app/models/network/graph.rb
index 27072836cbb..ffec4712e45 100644
--- a/app/models/network/graph.rb
+++ b/app/models/network/graph.rb
@@ -8,10 +8,11 @@ module Network
@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
@@ -107,7 +108,9 @@ module Network
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