@@ -233,7 +233,7 @@ struct GitArchiveInputScheme : InputScheme
233233 std::optional<Hash> treeHash;
234234 };
235235
236- virtual RefInfo getRevFromRef (const Settings & settings, nix::ref< Store> store, const Input & input) const = 0;
236+ virtual RefInfo getRevFromRef (const Settings & settings, nix::Store & store, const Input & input) const = 0;
237237
238238 virtual DownloadUrl getDownloadUrl (const Settings & settings, const Input & input) const = 0;
239239
@@ -243,7 +243,7 @@ struct GitArchiveInputScheme : InputScheme
243243 time_t lastModified;
244244 };
245245
246- std::pair<Input, TarballInfo> downloadArchive (const Settings & settings, ref< Store> store, Input input) const
246+ std::pair<Input, TarballInfo> downloadArchive (const Settings & settings, Store & store, Input input) const
247247 {
248248 if (!maybeGetStrAttr (input.attrs , " ref" ))
249249 input.attrs .insert_or_assign (" ref" , " HEAD" );
@@ -316,7 +316,7 @@ struct GitArchiveInputScheme : InputScheme
316316 }
317317
318318 std::pair<ref<SourceAccessor>, Input>
319- getAccessor (const Settings & settings, ref< Store> store, const Input & _input) const override
319+ getAccessor (const Settings & settings, Store & store, const Input & _input) const override
320320 {
321321 auto [input, tarballInfo] = downloadArchive (settings, store, _input);
322322
@@ -345,7 +345,7 @@ struct GitArchiveInputScheme : InputScheme
345345 return Xp::Flakes;
346346 }
347347
348- std::optional<std::string> getFingerprint (ref< Store> store, const Input & input) const override
348+ std::optional<std::string> getFingerprint (Store & store, const Input & input) const override
349349 {
350350 if (auto rev = input.getRev ())
351351 return rev->gitRev ();
@@ -387,7 +387,7 @@ struct GitHubInputScheme : GitArchiveInputScheme
387387 return getStrAttr (input.attrs , " repo" );
388388 }
389389
390- RefInfo getRevFromRef (const Settings & settings, nix::ref< Store> store, const Input & input) const override
390+ RefInfo getRevFromRef (const Settings & settings, nix::Store & store, const Input & input) const override
391391 {
392392 auto host = getHost (input);
393393 auto url = fmt (
@@ -401,7 +401,7 @@ struct GitHubInputScheme : GitArchiveInputScheme
401401
402402 auto downloadResult = downloadFile (store, settings, url, " source" , headers);
403403 auto json = nlohmann::json::parse (
404- store-> requireStoreObjectAccessor (downloadResult.storePath )->readFile (CanonPath::root));
404+ store. requireStoreObjectAccessor (downloadResult.storePath )->readFile (CanonPath::root));
405405
406406 return RefInfo{
407407 .rev = Hash::parseAny (std::string{json[" sha" ]}, HashAlgorithm::SHA1),
@@ -426,7 +426,7 @@ struct GitHubInputScheme : GitArchiveInputScheme
426426 return DownloadUrl{parseURL (url), headers};
427427 }
428428
429- void clone (const Settings & settings, ref< Store> store, const Input & input, const std::filesystem::path & destDir)
429+ void clone (const Settings & settings, Store & store, const Input & input, const std::filesystem::path & destDir)
430430 const override
431431 {
432432 auto host = getHost (input);
@@ -462,7 +462,7 @@ struct GitLabInputScheme : GitArchiveInputScheme
462462 return std::make_pair (token.substr (0 , fldsplit), token.substr (fldsplit + 1 ));
463463 }
464464
465- RefInfo getRevFromRef (const Settings & settings, nix::ref< Store> store, const Input & input) const override
465+ RefInfo getRevFromRef (const Settings & settings, nix::Store & store, const Input & input) const override
466466 {
467467 auto host = maybeGetStrAttr (input.attrs , " host" ).value_or (" gitlab.com" );
468468 // See rate limiting note below
@@ -477,7 +477,7 @@ struct GitLabInputScheme : GitArchiveInputScheme
477477
478478 auto downloadResult = downloadFile (store, settings, url, " source" , headers);
479479 auto json = nlohmann::json::parse (
480- store-> requireStoreObjectAccessor (downloadResult.storePath )->readFile (CanonPath::root));
480+ store. requireStoreObjectAccessor (downloadResult.storePath )->readFile (CanonPath::root));
481481
482482 if (json.is_array () && json.size () >= 1 && json[0 ][" id" ] != nullptr ) {
483483 return RefInfo{.rev = Hash::parseAny (std::string (json[0 ][" id" ]), HashAlgorithm::SHA1)};
@@ -508,7 +508,7 @@ struct GitLabInputScheme : GitArchiveInputScheme
508508 return DownloadUrl{parseURL (url), headers};
509509 }
510510
511- void clone (const Settings & settings, ref< Store> store, const Input & input, const std::filesystem::path & destDir)
511+ void clone (const Settings & settings, Store & store, const Input & input, const std::filesystem::path & destDir)
512512 const override
513513 {
514514 auto host = maybeGetStrAttr (input.attrs , " host" ).value_or (" gitlab.com" );
@@ -538,7 +538,7 @@ struct SourceHutInputScheme : GitArchiveInputScheme
538538 // Once it is implemented, however, should work as expected.
539539 }
540540
541- RefInfo getRevFromRef (const Settings & settings, nix::ref< Store> store, const Input & input) const override
541+ RefInfo getRevFromRef (const Settings & settings, nix::Store & store, const Input & input) const override
542542 {
543543 // TODO: In the future, when the sourcehut graphql API is implemented for mercurial
544544 // and with anonymous access, this method should use it instead.
@@ -554,7 +554,7 @@ struct SourceHutInputScheme : GitArchiveInputScheme
554554 std::string refUri;
555555 if (ref == " HEAD" ) {
556556 auto downloadFileResult = downloadFile (store, settings, fmt (" %s/HEAD" , base_url), " source" , headers);
557- auto contents = store-> requireStoreObjectAccessor (downloadFileResult.storePath )->readFile (CanonPath::root);
557+ auto contents = store. requireStoreObjectAccessor (downloadFileResult.storePath )->readFile (CanonPath::root);
558558
559559 auto remoteLine = git::parseLsRemoteLine (getLine (contents).first );
560560 if (!remoteLine) {
@@ -567,7 +567,7 @@ struct SourceHutInputScheme : GitArchiveInputScheme
567567 std::regex refRegex (refUri);
568568
569569 auto downloadFileResult = downloadFile (store, settings, fmt (" %s/info/refs" , base_url), " source" , headers);
570- auto contents = store-> requireStoreObjectAccessor (downloadFileResult.storePath )->readFile (CanonPath::root);
570+ auto contents = store. requireStoreObjectAccessor (downloadFileResult.storePath )->readFile (CanonPath::root);
571571 std::istringstream is (contents);
572572
573573 std::string line;
@@ -598,7 +598,7 @@ struct SourceHutInputScheme : GitArchiveInputScheme
598598 return DownloadUrl{parseURL (url), headers};
599599 }
600600
601- void clone (const Settings & settings, ref< Store> store, const Input & input, const std::filesystem::path & destDir)
601+ void clone (const Settings & settings, Store & store, const Input & input, const std::filesystem::path & destDir)
602602 const override
603603 {
604604 auto host = maybeGetStrAttr (input.attrs , " host" ).value_or (" git.sr.ht" );
0 commit comments