diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-12 09:09:53 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-12 09:09:53 +0300 |
commit | 90156f527b43a15e794c3351ecfc59aff42c440a (patch) | |
tree | a59318246adf4297b3911f442b6a789fd38d35a6 /app/models/network | |
parent | 737684a392db1178770ad5b1d20b64386aadcac5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/network')
-rw-r--r-- | app/models/network/graph.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/network/graph.rb b/app/models/network/graph.rb index 6b5ea0fc3fc..9da454125eb 100644 --- a/app/models/network/graph.rb +++ b/app/models/network/graph.rb @@ -211,7 +211,7 @@ module Network # Visit branching chains leaves.each do |l| - parents = l.parents(@map).select {|p| p.space.zero?} + parents = l.parents(@map).select {|p| p.space == 0} parents.each do |p| place_chain(p, l.time) end @@ -266,14 +266,14 @@ module Network def take_left_leaves(raw_commit) commit = @map[raw_commit.id] leaves = [] - leaves.push(commit) if commit.space.zero? + leaves.push(commit) if commit.space == 0 loop do - return leaves if commit.parents(@map).count.zero? + return leaves if commit.parents(@map).count == 0 commit = commit.parents(@map).first - return leaves unless commit.space.zero? + return leaves unless commit.space == 0 leaves.push(commit) end |