mirror of
https://github.com/NixOS/nix
synced 2025-06-28 13:41:15 +02:00
Remove git:// support in NIX_PATH
This didn't support specifying a revision/branch, and was restricted to git:// URIs (since https:// or ssh:// would be ambiguous).
This commit is contained in:
parent
ee6ac38848
commit
6cf7c6a6b0
4 changed files with 9 additions and 38 deletions
|
@ -523,7 +523,6 @@ formal
|
|||
#include "eval.hh"
|
||||
#include "download.hh"
|
||||
#include "store-api.hh"
|
||||
#include "primops/fetchgit.hh"
|
||||
|
||||
|
||||
namespace nix {
|
||||
|
@ -665,11 +664,7 @@ std::pair<bool, std::string> EvalState::resolveSearchPathElem(const SearchPathEl
|
|||
|
||||
if (isUri(elem.second)) {
|
||||
try {
|
||||
if (hasPrefix(elem.second, "git://") || hasSuffix(elem.second, ".git"))
|
||||
// FIXME: support specifying revision/branch
|
||||
res = { true, exportGit(store, elem.second).storePath };
|
||||
else
|
||||
res = { true, getDownloader()->downloadCached(store, elem.second, true) };
|
||||
res = { true, getDownloader()->downloadCached(store, elem.second, true) };
|
||||
} catch (DownloadError & e) {
|
||||
printError(format("warning: Nix search path entry '%1%' cannot be downloaded, ignoring") % elem.second);
|
||||
res = { false, "" };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue