Include 'branch_name' in the commit data provided by the API
Currently, there is no possibility to retrieve the branch a commit was pushed to via the API. Suppose you have the id of a commit and you want to know the branch, you can't get the branch name by asking the API. The commit data returned by http://docs.gitlab.com/ce/api/commits.html#get-a-single-commit does not include branch information. Therefore, the only way to get the branch is retrieving all branches (in the worst case) and searching for the commit.
Solution to this problem would be including a 'branch_name' field in commit data delivered by the API.