Limit the number of branches and tags that include the commit of commit#show
Description
On Commit#show, for example: https://gitlab.com/gitlab-org/gitaly/commit/9f608d250f9a32d21d2d01543e5bb872e3ce6d0f
, we show the branch and tag names the current commit is in. If the repository has too many branches we show 'Branches unavailable': https://gitlab.com/gitlab-org/gitlab-ce/commit/7a18675c59d46da7234dd0cdf6960b527b513a80
. If that's not the case, I want to limit the number of branches/tag names we show to 25 each. So at most, you'll see 25 branch names and 25 tag names.
This enhances performance as we only have to do the operation for the first 25 items that match, that is that contain a certain commit id.