This is the start of implementing the package described in issue #7.
I started with the regular expressions defined in the distribution reference package at commit 97b1d649c4938d0f608d96454d6a8326b1f96acd and worked from there.
I made a few changes, some or all of which may be misguided :)
The most significant of the changes is that a reference of the form a/b is parsed as the (relative) repository name a/b rather than host a followed by repository b. This means that it's always unambiguous whether a reference is relative or absolute.
The distinction is made based on whether the first component is unambiguously a host name; specifically one of:
This is the start of implementing the package described in issue #7.
I started with the regular expressions defined in the distribution reference package at commit 97b1d649c4938d0f608d96454d6a8326b1f96acd and worked from there.
I made a few changes, some or all of which may be misguided :)
The most significant of the changes is that a reference of the form
a/b
is parsed as the (relative) repository namea/b
rather than hosta
followed by repositoryb
. This means that it's always unambiguous whether a reference is relative or absolute.The distinction is made based on whether the first component is unambiguously a host name; specifically one of: