mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
fetchTree: Disallow combination of submodules and exportIgnore for now
This commit is contained in:
parent
71d08af15b
commit
692e9197bc
3 changed files with 32 additions and 13 deletions
|
@ -1,3 +1,4 @@
|
|||
#include "libfetchers/attrs.hh"
|
||||
#include "primops.hh"
|
||||
#include "eval-inline.hh"
|
||||
#include "eval-settings.hh"
|
||||
|
@ -139,9 +140,7 @@ static void fetchTree(
|
|||
state.symbols[attr.name], showType(*attr.value)));
|
||||
}
|
||||
|
||||
if (params.isFetchGit && !attrs.contains("exportIgnore")) {
|
||||
// Default value; user attrs are assigned later.
|
||||
// FIXME: exportIgnore := !submodules
|
||||
if (params.isFetchGit && !attrs.contains("exportIgnore") && (!attrs.contains("submodules") || !*fetchers::maybeGetBoolAttr(attrs, "submodules"))) {
|
||||
attrs.emplace("exportIgnore", Explicit<bool>{true});
|
||||
}
|
||||
|
||||
|
@ -162,8 +161,7 @@ static void fetchTree(
|
|||
fetchers::Attrs attrs;
|
||||
attrs.emplace("type", "git");
|
||||
attrs.emplace("url", fixGitURL(url));
|
||||
if (!attrs.contains("exportIgnore")) {
|
||||
// FIXME: exportIgnore := !submodules
|
||||
if (!attrs.contains("exportIgnore") && (!attrs.contains("submodules") || !*fetchers::maybeGetBoolAttr(attrs, "submodules"))) {
|
||||
attrs.emplace("exportIgnore", Explicit<bool>{true});
|
||||
}
|
||||
input = fetchers::Input::fromAttrs(std::move(attrs));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue