mirror of
https://github.com/NixOS/nix
synced 2025-06-25 23:11:16 +02:00
Formatting
This commit is contained in:
parent
428a3e8cc8
commit
a902b84374
1 changed files with 4 additions and 3 deletions
|
@ -52,7 +52,8 @@ static std::string getLfsApiToken(const ParsedURL & url)
|
||||||
if (output.empty())
|
if (output.empty())
|
||||||
throw Error(
|
throw Error(
|
||||||
"git-lfs-authenticate: no output (cmd: ssh %s git-lfs-authenticate %s download)",
|
"git-lfs-authenticate: no output (cmd: ssh %s git-lfs-authenticate %s download)",
|
||||||
url.authority.value_or(""), url.path);
|
url.authority.value_or(""),
|
||||||
|
url.path);
|
||||||
|
|
||||||
auto queryResp = nlohmann::json::parse(output);
|
auto queryResp = nlohmann::json::parse(output);
|
||||||
if (!queryResp.contains("header"))
|
if (!queryResp.contains("header"))
|
||||||
|
@ -237,8 +238,8 @@ void Fetch::fetch(
|
||||||
}
|
}
|
||||||
|
|
||||||
Path cacheDir = getCacheDir() + "/git-lfs";
|
Path cacheDir = getCacheDir() + "/git-lfs";
|
||||||
std::string key =
|
std::string key = hashString(HashAlgorithm::SHA256, pointerFilePath.rel()).to_string(HashFormat::Base16, false)
|
||||||
hashString(HashAlgorithm::SHA256, pointerFilePath.rel()).to_string(HashFormat::Base16, false) + "/" + pointer->oid;
|
+ "/" + pointer->oid;
|
||||||
Path cachePath = cacheDir + "/" + key;
|
Path cachePath = cacheDir + "/" + key;
|
||||||
if (pathExists(cachePath)) {
|
if (pathExists(cachePath)) {
|
||||||
debug("using cache entry %s -> %s", key, cachePath);
|
debug("using cache entry %s -> %s", key, cachePath);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue