metacello
metacello copied to clipboard
Unable to reference to git branch name containing slash in baseline/scripting API
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. :-)
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.