mirror of
https://github.com/NixOS/nix
synced 2025-06-28 05:21: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 "error.hh"
|
||||
#include "fetchers.hh"
|
||||
#include "users.hh"
|
||||
#include "cache.hh"
|
||||
|
@ -739,6 +740,16 @@ struct GitInputScheme : InputScheme
|
|||
|
||||
auto repoInfo = getRepoInfo(input);
|
||||
|
||||
if (getExportIgnoreAttr(input)
|
||||
&& getSubmodulesAttr(input)) {
|
||||
/* In this situation, we don't have a git CLI behavior that we can copy.
|
||||
`git archive` does not support submodules, so it is unclear whether
|
||||
rules from the parent should affect the submodule or not.
|
||||
When git may eventually implement this, we need Nix to match its
|
||||
behavior. */
|
||||
throw UnimplementedError("exportIgnore and submodules are not supported together yet");
|
||||
}
|
||||
|
||||
auto [accessor, final] =
|
||||
input.getRef() || input.getRev() || !repoInfo.isLocal
|
||||
? getAccessorFromCommit(store, repoInfo, std::move(input))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue