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

Unable to reference to git branch name containing slash in baseline/scripting API #544

Open
LinqLover opened this issue May 26, 2021 · 1 comment
Labels

Comments

@LinqLover
Copy link
Collaborator

I have a repository with a branch of the form feat/foo and was trying to reference it from another baseline using the common syntax:

spec repository: 'github://LinqLover/my-repo:feat/foo/packages'.

But this cannot work because this is interpreted as: branch = 'feat' + path = 'foo/packages'.

The relevant logic is in MCGitBasedNetworkRepository class >> #parseLocation:version:. A possible fix could be to support simple escaping in a form such as:

spec repository: 'github://LinqLover/my-repo:feat\/foo/packages'.

Another form of escaping might be an enclosing character for the entire branch name, but since different brackets and quotes are all legal characters for branch names[1], backslash-escaping would probably be the simplest possible way.

@dalehenrich Would you agree with this solution approach? Maybe I could find some time to patch the location parsing soon. :-)

[1] https://stackoverflow.com/a/3651867/13994294

@LinqLover LinqLover added the bug label May 26, 2021
LinqLover added a commit to hpi-swa-lab/squeak-inbox-talk that referenced this issue May 26, 2021
@LinqLover
Copy link
Collaborator Author

Ah, I just discovered #234 ... Apparently this fix only works if the repository path is explicitly specified, which was not the case in my example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant