Use git+ prefix in flake URI schemes

Fixes #3045.
This commit is contained in:
Eelco Dolstra
2019-09-05 17:15:09 +02:00
parent 6f88fed819
commit 2fa7f2a56a
3 changed files with 36 additions and 26 deletions
+2
View File
@@ -25,6 +25,8 @@ GitInfo exportGit(ref<Store> store, std::string uri,
{
assert(!rev || rev->type == htSHA1);
if (hasPrefix(uri, "git+")) uri = std::string(uri, 4);
bool isLocal = hasPrefix(uri, "/") && pathExists(uri + "/.git");
// If this is a local directory (but not a file:// URI) and no ref