Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #90 getLocalRef() returns wrong ref #91

Merged
merged 1 commit into from Jun 14, 2021
Merged

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