diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2018-02-07 18:42:55 +0300 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-02-07 18:42:55 +0300 |
commit | 683984f2e3e5ae72f375748ccfc5bfbf605911fa (patch) | |
tree | 49498057c4f130412f34dd6e4a6c1a2e9358cb40 /app | |
parent | 15d766fc9345858db5e3c55da47204fb61a5531f (diff) | |
parent | 73e78c4e1517dd50bd5dd0934e0f62288de2971b (diff) |
Merge branch 'zj-refs-hash' into 'master'
Don't use rugged in Repository#refs_hash
Closes gitaly#880
See merge request gitlab-org/gitlab-ce!16827
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/graph_helper.rb | 8 | ||||
-rw-r--r-- | app/views/projects/network/show.json.erb | 2 |
2 files changed, 3 insertions, 7 deletions
diff --git a/app/helpers/graph_helper.rb b/app/helpers/graph_helper.rb index 6d303ba857d..1022070ab6f 100644 --- a/app/helpers/graph_helper.rb +++ b/app/helpers/graph_helper.rb @@ -1,10 +1,6 @@ module GraphHelper - def get_refs(repo, commit) - refs = "" - # 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(' ') + def refs(repo, commit) + refs = commit.ref_names(repo).join(' ') # append note count notes_count = @graph.notes[commit.id] diff --git a/app/views/projects/network/show.json.erb b/app/views/projects/network/show.json.erb index 122e84b41b2..7491b37310d 100644 --- a/app/views/projects/network/show.json.erb +++ b/app/views/projects/network/show.json.erb @@ -13,7 +13,7 @@ }, time: c.time, space: c.spaces.first, - refs: get_refs(@graph.repo, c), + refs: refs(@graph.repo, c), id: c.sha, date: c.date, message: c.message, |