mirror of
https://github.com/NixOS/nix
synced 2025-07-21 04:09:44 +02:00
GitExportIgnoreSourceAccessor: Don't show «unknown»
In general we should set the path display prefix on the inner accessor, so we now pass the display prefix to getAccessor().
This commit is contained in:
parent
102d90ebf0
commit
3032512425
5 changed files with 29 additions and 20 deletions
|
@ -105,7 +105,8 @@ DownloadFileResult downloadFile(
|
|||
|
||||
static DownloadTarballResult downloadTarball_(
|
||||
const std::string & url,
|
||||
const Headers & headers)
|
||||
const Headers & headers,
|
||||
const std::string & displayPrefix)
|
||||
{
|
||||
Cache::Key cacheKey{"tarball", {{"url", url}}};
|
||||
|
||||
|
@ -118,7 +119,7 @@ static DownloadTarballResult downloadTarball_(
|
|||
.treeHash = treeHash,
|
||||
.lastModified = (time_t) getIntAttr(infoAttrs, "lastModified"),
|
||||
.immutableUrl = maybeGetStrAttr(infoAttrs, "immutableUrl"),
|
||||
.accessor = getTarballCache()->getAccessor(treeHash, false),
|
||||
.accessor = getTarballCache()->getAccessor(treeHash, false, displayPrefix),
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -371,9 +372,10 @@ struct TarballInputScheme : CurlInputScheme
|
|||
{
|
||||
auto input(_input);
|
||||
|
||||
auto result = downloadTarball_(getStrAttr(input.attrs, "url"), {});
|
||||
|
||||
result.accessor->setPathDisplay("«" + input.to_string() + "»");
|
||||
auto result = downloadTarball_(
|
||||
getStrAttr(input.attrs, "url"),
|
||||
{},
|
||||
"«" + input.to_string() + "»");
|
||||
|
||||
if (result.immutableUrl) {
|
||||
auto immutableInput = Input::fromURL(*input.settings, *result.immutableUrl);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue