1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-19 23:03:53 -04:00

GitInputScheme: Fix path display for workdirs and submodules

This commit is contained in:
Eelco Dolstra 2024-04-16 16:11:57 +02:00
parent 79363b2273
commit 6892c9803c

View file

@ -645,6 +645,7 @@ struct GitInputScheme : InputScheme
auto submoduleInput = fetchers::Input::fromAttrs(std::move(attrs)); auto submoduleInput = fetchers::Input::fromAttrs(std::move(attrs));
auto [submoduleAccessor, submoduleInput2] = auto [submoduleAccessor, submoduleInput2] =
submoduleInput.getAccessor(store); submoduleInput.getAccessor(store);
submoduleAccessor->setPathDisplay("«" + submoduleInput.to_string() + "»");
mounts.insert_or_assign(submodule.path, submoduleAccessor); mounts.insert_or_assign(submodule.path, submoduleAccessor);
} }
@ -681,6 +682,8 @@ struct GitInputScheme : InputScheme
exportIgnore, exportIgnore,
makeNotAllowedError(repoInfo.url)); makeNotAllowedError(repoInfo.url));
accessor->setPathDisplay(repoInfo.url);
/* If the repo has submodules, return a mounted input accessor /* If the repo has submodules, return a mounted input accessor
consisting of the accessor for the top-level repo and the consisting of the accessor for the top-level repo and the
accessors for the submodule workdirs. */ accessors for the submodule workdirs. */
@ -697,6 +700,7 @@ struct GitInputScheme : InputScheme
auto submoduleInput = fetchers::Input::fromAttrs(std::move(attrs)); auto submoduleInput = fetchers::Input::fromAttrs(std::move(attrs));
auto [submoduleAccessor, submoduleInput2] = auto [submoduleAccessor, submoduleInput2] =
submoduleInput.getAccessor(store); submoduleInput.getAccessor(store);
submoduleAccessor->setPathDisplay("«" + submoduleInput.to_string() + "»");
/* If the submodule is dirty, mark this repo dirty as /* If the submodule is dirty, mark this repo dirty as
well. */ well. */