summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Newdigate <andrew@gitlab.com>2018-03-06 12:11:18 +0000
committerAndrew Newdigate <andrew@gitlab.com>2018-03-06 12:11:18 +0000
commitf0e4b8af788396467d3c69ef21caa78fab020c2f (patch)
tree6fb81fa06ed3f035e930f66a5dd53ee707a28f95
parent793f352d6478086e6ab33c9ad4c3822a067e6c51 (diff)
downloadgitlab-ce-an/network-controller-fix.tar.gz
Accepting Sean's suggestionan/network-controller-fix
-rw-r--r--app/models/network/commit.rb7
1 files changed, 1 insertions, 6 deletions
diff --git a/app/models/network/commit.rb b/app/models/network/commit.rb
index 92b9ad55292..22d48c9e661 100644
--- a/app/models/network/commit.rb
+++ b/app/models/network/commit.rb
@@ -24,12 +24,7 @@ module Network
end
def parents(map)
- @commit.parent_ids.map do |p_id|
- if map.include?(p_id)
- map[p_id]
- end
- end
- .compact
+ map.values_at(*@commit.parent_ids).compact
end
end
end