@@ -258,7 +258,7 @@ struct GitArchiveInputScheme : InputScheme
258258 std::optional<Hash> treeHash;
259259 };
260260
261- virtual RefInfo getRevFromRef (const Settings & settings, nix::ref< Store> store, const Input & input) const = 0;
261+ virtual RefInfo getRevFromRef (const Settings & settings, nix::Store & store, const Input & input) const = 0;
262262
263263 virtual DownloadUrl getDownloadUrl (const Settings & settings, const Input & input) const = 0;
264264
@@ -268,7 +268,7 @@ struct GitArchiveInputScheme : InputScheme
268268 time_t lastModified;
269269 };
270270
271- std::pair<Input, TarballInfo> downloadArchive (const Settings & settings, ref< Store> store, Input input) const
271+ std::pair<Input, TarballInfo> downloadArchive (const Settings & settings, Store & store, Input input) const
272272 {
273273 if (!maybeGetStrAttr (input.attrs , " ref" ))
274274 input.attrs .insert_or_assign (" ref" , " HEAD" );
@@ -341,7 +341,7 @@ struct GitArchiveInputScheme : InputScheme
341341 }
342342
343343 std::pair<ref<SourceAccessor>, Input>
344- getAccessor (const Settings & settings, ref< Store> store, const Input & _input) const override
344+ getAccessor (const Settings & settings, Store & store, const Input & _input) const override
345345 {
346346 auto [input, tarballInfo] = downloadArchive (settings, store, _input);
347347
@@ -370,7 +370,7 @@ struct GitArchiveInputScheme : InputScheme
370370 return Xp::Flakes;
371371 }
372372
373- std::optional<std::string> getFingerprint (ref< Store> store, const Input & input) const override
373+ std::optional<std::string> getFingerprint (Store & store, const Input & input) const override
374374 {
375375 if (auto rev = input.getRev ())
376376 return rev->gitRev ();
@@ -418,7 +418,7 @@ struct GitHubInputScheme : GitArchiveInputScheme
418418 return getStrAttr (input.attrs , " repo" );
419419 }
420420
421- RefInfo getRevFromRef (const Settings & settings, nix::ref< Store> store, const Input & input) const override
421+ RefInfo getRevFromRef (const Settings & settings, nix::Store & store, const Input & input) const override
422422 {
423423 auto host = getHost (input);
424424 auto url = fmt (
@@ -432,7 +432,7 @@ struct GitHubInputScheme : GitArchiveInputScheme
432432
433433 auto downloadResult = downloadFile (store, settings, url, " source" , headers);
434434 auto json = nlohmann::json::parse (
435- store-> requireStoreObjectAccessor (downloadResult.storePath )->readFile (CanonPath::root));
435+ store. requireStoreObjectAccessor (downloadResult.storePath )->readFile (CanonPath::root));
436436
437437 return RefInfo{
438438 .rev = Hash::parseAny (std::string{json[" sha" ]}, HashAlgorithm::SHA1),
@@ -457,7 +457,7 @@ struct GitHubInputScheme : GitArchiveInputScheme
457457 return DownloadUrl{parseURL (url), headers};
458458 }
459459
460- void clone (const Settings & settings, ref< Store> store, const Input & input, const std::filesystem::path & destDir)
460+ void clone (const Settings & settings, Store & store, const Input & input, const std::filesystem::path & destDir)
461461 const override
462462 {
463463 auto host = getHost (input);
@@ -499,7 +499,7 @@ struct GitLabInputScheme : GitArchiveInputScheme
499499 return std::make_pair (token.substr (0 , fldsplit), token.substr (fldsplit + 1 ));
500500 }
501501
502- RefInfo getRevFromRef (const Settings & settings, nix::ref< Store> store, const Input & input) const override
502+ RefInfo getRevFromRef (const Settings & settings, nix::Store & store, const Input & input) const override
503503 {
504504 auto host = maybeGetStrAttr (input.attrs , " host" ).value_or (" gitlab.com" );
505505 // See rate limiting note below
@@ -514,7 +514,7 @@ struct GitLabInputScheme : GitArchiveInputScheme
514514
515515 auto downloadResult = downloadFile (store, settings, url, " source" , headers);
516516 auto json = nlohmann::json::parse (
517- store-> requireStoreObjectAccessor (downloadResult.storePath )->readFile (CanonPath::root));
517+ store. requireStoreObjectAccessor (downloadResult.storePath )->readFile (CanonPath::root));
518518
519519 if (json.is_array () && json.size () >= 1 && json[0 ][" id" ] != nullptr ) {
520520 return RefInfo{.rev = Hash::parseAny (std::string (json[0 ][" id" ]), HashAlgorithm::SHA1)};
@@ -545,7 +545,7 @@ struct GitLabInputScheme : GitArchiveInputScheme
545545 return DownloadUrl{parseURL (url), headers};
546546 }
547547
548- void clone (const Settings & settings, ref< Store> store, const Input & input, const std::filesystem::path & destDir)
548+ void clone (const Settings & settings, Store & store, const Input & input, const std::filesystem::path & destDir)
549549 const override
550550 {
551551 auto host = maybeGetStrAttr (input.attrs , " host" ).value_or (" gitlab.com" );
@@ -581,7 +581,7 @@ struct SourceHutInputScheme : GitArchiveInputScheme
581581 // Once it is implemented, however, should work as expected.
582582 }
583583
584- RefInfo getRevFromRef (const Settings & settings, nix::ref< Store> store, const Input & input) const override
584+ RefInfo getRevFromRef (const Settings & settings, nix::Store & store, const Input & input) const override
585585 {
586586 // TODO: In the future, when the sourcehut graphql API is implemented for mercurial
587587 // and with anonymous access, this method should use it instead.
@@ -597,7 +597,7 @@ struct SourceHutInputScheme : GitArchiveInputScheme
597597 std::string refUri;
598598 if (ref == " HEAD" ) {
599599 auto downloadFileResult = downloadFile (store, settings, fmt (" %s/HEAD" , base_url), " source" , headers);
600- auto contents = store-> requireStoreObjectAccessor (downloadFileResult.storePath )->readFile (CanonPath::root);
600+ auto contents = store. requireStoreObjectAccessor (downloadFileResult.storePath )->readFile (CanonPath::root);
601601
602602 auto remoteLine = git::parseLsRemoteLine (getLine (contents).first );
603603 if (!remoteLine) {
@@ -610,7 +610,7 @@ struct SourceHutInputScheme : GitArchiveInputScheme
610610 std::regex refRegex (refUri);
611611
612612 auto downloadFileResult = downloadFile (store, settings, fmt (" %s/info/refs" , base_url), " source" , headers);
613- auto contents = store-> requireStoreObjectAccessor (downloadFileResult.storePath )->readFile (CanonPath::root);
613+ auto contents = store. requireStoreObjectAccessor (downloadFileResult.storePath )->readFile (CanonPath::root);
614614 std::istringstream is (contents);
615615
616616 std::string line;
@@ -641,7 +641,7 @@ struct SourceHutInputScheme : GitArchiveInputScheme
641641 return DownloadUrl{parseURL (url), headers};
642642 }
643643
644- void clone (const Settings & settings, ref< Store> store, const Input & input, const std::filesystem::path & destDir)
644+ void clone (const Settings & settings, Store & store, const Input & input, const std::filesystem::path & destDir)
645645 const override
646646 {
647647 auto host = maybeGetStrAttr (input.attrs , " host" ).value_or (" git.sr.ht" );
0 commit comments