Skip to content

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

@LinqLover

Description

@LinqLover

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions