klaussilveira/gitlist — pull request #230 by vognev (2012-12-23 12:45:08+00:00)
Title: fix situation when valid ref is a part of path

it might happen that path already contains part, which is matching against valid ref name, but actually whole path does not refers to matched ref

for example, the valid refs
gantt
master

and path: master/assets/gantt/gantt.js

while iterating first ref will be matched, but the path actually is pointing to master ref

GitList\Util\Repository::extractRef() seems is overcomplicated,
but anyway, this is worked for me and tests confirmed that it's not breaks something