mirror of
https://github.com/NixOS/nix
synced 2025-06-26 20:01:15 +02:00
Set the origin instead of hacking in the URL resolving
This commit is contained in:
parent
1f73de2629
commit
1a76ca4161
3 changed files with 14 additions and 15 deletions
|
@ -526,6 +526,9 @@ struct GitInputScheme : InputScheme
|
|||
|
||||
auto repo = GitRepo::openRepo(cacheDir, true, true);
|
||||
|
||||
// We need to set the origin so resolving submodule URLs works
|
||||
repo->setRemote("origin", repoInfo.url);
|
||||
|
||||
Path localRefFile =
|
||||
ref.compare(0, 5, "refs/") == 0
|
||||
? cacheDir + "/" + ref
|
||||
|
@ -629,7 +632,7 @@ struct GitInputScheme : InputScheme
|
|||
std::map<CanonPath, nix::ref<InputAccessor>> mounts;
|
||||
|
||||
for (auto & [submodule, submoduleRev] : repo->getSubmodules(rev, exportIgnore)) {
|
||||
auto resolved = repo->resolveSubmoduleUrl(submodule.url, repoInfo.url);
|
||||
auto resolved = repo->resolveSubmoduleUrl(submodule.url);
|
||||
debug("Git submodule %s: %s %s %s -> %s",
|
||||
submodule.path, submodule.url, submodule.branch, submoduleRev.gitRev(), resolved);
|
||||
fetchers::Attrs attrs;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue