Skip to content

Speed up Repository#find_branch and Repository#find_tag by doing a direct lookup

Stan Hu requested to merge speed-up-find-branch into master

Speed up Repository#find_branch and Repository#find_tag by doing a direct lookup

The previous implementation would iterate through each branch or tag looking for the name in question. This is unnecessarily slow when a repo has many branches or tags. Instead, Rugged can do a single lookup by scanning refs/heads/<branch_name> or the packed-refs file.

Merge request reports