diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-09-24 07:43:53 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-09-24 07:43:53 +0000 |
commit | 4bf1e85cce80495da11d9ca86d15e8b43fef1141 (patch) | |
tree | 48e82f528830a73310860477cdf62c520f0d4645 /app | |
parent | a58c6e9a9561ffbb3d16a3a9a45bd90a34735b50 (diff) | |
parent | 150fb81ef90cba74bf7828e652e052b9ababcdf8 (diff) | |
download | gitlab-ce-4bf1e85cce80495da11d9ca86d15e8b43fef1141.tar.gz |
Merge branch 'fix-network-graph-refs' into 'master'
Remove git refs used internally by GitLab from network graph
GitLab 8.0 removed satellites and started using git refs that began with `refs/merge-requests/XXX` and `refs/tmp/XXX`, which showed up in an ugly way in the network graph:
![image](https://gitlab.com/stanhu/gitlab-ce/uploads/150eb7ae5f07f0d4793589b5eac462db/image.png)
Closes #2702
See merge request !1410
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/graph_helper.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/helpers/graph_helper.rb b/app/helpers/graph_helper.rb index e1dda20de85..1e372d5631d 100644 --- a/app/helpers/graph_helper.rb +++ b/app/helpers/graph_helper.rb @@ -1,7 +1,10 @@ module GraphHelper def get_refs(repo, commit) refs = "" - refs << commit.ref_names(repo).join(' ') + # Commit::ref_names already strips the refs/XXX from important refs (e.g. refs/heads/XXX) + # so anything leftover is internally used by GitLab + commit_refs = commit.ref_names(repo).reject{ |name| name.starts_with?('refs/') } + refs << commit_refs.join(' ') # append note count refs << "[#{@graph.notes[commit.id]}]" if @graph.notes[commit.id] > 0 |