summaryrefslogtreecommitdiff
path: root/app/models/network
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-04-03 21:05:10 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-04-03 21:05:10 +0300
commit3011ac4150e355da9e5956cb223d19e18425e0eb (patch)
tree1a857049b14ed6ff2a5f920d94101f9e2ccc7c63 /app/models/network
parent9f4fde04f5b74199c9bd72621e03c544aaf6f2ef (diff)
downloadgitlab-ce-3011ac4150e355da9e5956cb223d19e18425e0eb.tar.gz
Refactoring and cleanup. Removed unused commit finders
Diffstat (limited to 'app/models/network')
-rw-r--r--app/models/network/graph.rb23
1 files changed, 10 insertions, 13 deletions
diff --git a/app/models/network/graph.rb b/app/models/network/graph.rb
index 2957adbfc19..2419b719d20 100644
--- a/app/models/network/graph.rb
+++ b/app/models/network/graph.rb
@@ -25,10 +25,9 @@ module Network
def collect_commits
refs_cache = build_refs_cache
- find_commits(count_to_display_commit_in_center)
- .map do |commit|
- # Decorate with app/model/network/commit.rb
- Network::Commit.new(commit, refs_cache[commit.id])
+ find_commits(count_to_display_commit_in_center).map do |commit|
+ # Decorate with app/model/network/commit.rb
+ Network::Commit.new(commit, refs_cache[commit.id])
end
end
@@ -93,15 +92,13 @@ module Network
end
def find_commits(skip = 0)
- Grit::Commit.find_all(
- @repo,
- nil,
- {
- date_order: true,
- max_count: self.class.max_count,
- skip: skip
- }
- )
+ opts = {
+ date_order: true,
+ max_count: self.class.max_count,
+ skip: skip
+ }
+
+ Grit::Commit.find_all(@repo, opts, nil)
end
def commits_sort_by_ref