Skip to content

Conversation

dorny
Copy link
Owner

@dorny dorny commented Jun 14, 2021

git show-ref will return all branches where end segment matches the input. This cause issues when there are both someBranch and somePrefix/someBranch branches. This fix ensures the correct ref is returned by explicitly matching segments after common parts (e.g. refs/heads).

Fixes #90

git show-ref will return all branches where end segment matches the input. This cause issues when there are both 'someBranch' and 'somePrefix/someBranch' branches. This fix ensures the correct ref is returned by explicitly matching segments after common parts (e.g. refs/heads).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

getLocalRef can return the wrong ref when there are multiple branches with a similar name
1 participant