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

getLocalRef fails when using fully qualified refs #94

Open
raidenhasegawa opened this issue Jun 16, 2021 · 2 comments
Open

getLocalRef fails when using fully qualified refs #94

raidenhasegawa opened this issue Jun 16, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@raidenhasegawa
Copy link

raidenhasegawa commented Jun 16, 2021

This is a follow on issue to #90 (I wasn't able to reopen my issue closed by someone else because I'm not a collaborator, I think).

Behavior

Fix #91 worked well for me when using a short name, but it does break when I use a fully qualified ref. I think that the filter logic here breaks down when shortName is fully qualified, e.g., if shortName == 'refs/remotes/origin/{branch_name}, then match[1] == '{branch_name}' when match !== null.

Maybe a fix?

I think that this can be fixed by modifying getShortName to also strip 'refs/remotes/origin' from the ref.

@dorny
Copy link
Owner

dorny commented Jun 22, 2021

Thanks for reporting the issue. I will look into it again as soon as I will find some time. Hopefully this time I will get the solution right :)

@dorny dorny added the bug Something isn't working label Jun 22, 2021
@raidenhasegawa
Copy link
Author

Awesome. Thanks, @dorny.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants