mirror of
https://github.com/NixOS/nix.git
synced 2025-11-08 19:46:02 +01:00
Generalize recognized git url schemas (#13925)
Use `parseUrlScheme` instead of manually parsing `url.scheme`.
This commit is contained in:
parent
df9b3bfba8
commit
dbc235cc62
1 changed files with 2 additions and 2 deletions
|
|
@ -163,8 +163,8 @@ struct GitInputScheme : InputScheme
|
||||||
{
|
{
|
||||||
std::optional<Input> inputFromURL(const Settings & settings, const ParsedURL & url, bool requireTree) const override
|
std::optional<Input> inputFromURL(const Settings & settings, const ParsedURL & url, bool requireTree) const override
|
||||||
{
|
{
|
||||||
if (url.scheme != "git" && url.scheme != "git+http" && url.scheme != "git+https" && url.scheme != "git+ssh"
|
auto parsedScheme = parseUrlScheme(url.scheme);
|
||||||
&& url.scheme != "git+file")
|
if (parsedScheme.application != "git")
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
auto url2(url);
|
auto url2(url);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue