diff options
author | Stan Hu <stanhu@gmail.com> | 2015-09-23 08:21:51 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-09-23 08:56:32 -0700 |
commit | 150fb81ef90cba74bf7828e652e052b9ababcdf8 (patch) | |
tree | c11fd94cfcb68fa7ad209822ee6e6d13a694b7ed /app/helpers/graph_helper.rb | |
parent | 03fd5919a393b8784c601c76c3ed65912f4b522a (diff) | |
download | gitlab-ce-150fb81ef90cba74bf7828e652e052b9ababcdf8.tar.gz |
Remove git refs used internally by GitLab from network graph
Closes #2702
Diffstat (limited to 'app/helpers/graph_helper.rb')
-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 |