@@ -229,7 +229,7 @@ struct GitInputScheme : InputScheme
229229 if (auto ref = maybeGetStrAttr (attrs, " ref" ); ref && !isLegalRefName (*ref))
230230 throw BadURL (" invalid Git branch/tag name '%s'" , *ref);
231231
232- Input input{settings };
232+ Input input{};
233233 input.attrs = attrs;
234234 input.attrs [" url" ] = fixGitURL (getStrAttr (attrs, " url" )).to_string ();
235235 getShallowAttr (input);
@@ -278,7 +278,7 @@ struct GitInputScheme : InputScheme
278278 return res;
279279 }
280280
281- void clone (const Input & input, const Path & destDir) const override
281+ void clone (const Settings & settings, const Input & input, const Path & destDir) const override
282282 {
283283 auto repoInfo = getRepoInfo (input);
284284
@@ -623,7 +623,7 @@ struct GitInputScheme : InputScheme
623623 }
624624
625625 std::pair<ref<SourceAccessor>, Input>
626- getAccessorFromCommit (ref<Store> store, RepoInfo & repoInfo, Input && input) const
626+ getAccessorFromCommit (const Settings & settings, ref<Store> store, RepoInfo & repoInfo, Input && input) const
627627 {
628628 assert (!repoInfo.workdirInfo .isDirty );
629629
@@ -733,10 +733,10 @@ struct GitInputScheme : InputScheme
733733
734734 auto rev = *input.getRev ();
735735
736- input.attrs .insert_or_assign (" lastModified" , getLastModified (*input. settings , repoInfo, repoDir, rev));
736+ input.attrs .insert_or_assign (" lastModified" , getLastModified (settings, repoInfo, repoDir, rev));
737737
738738 if (!getShallowAttr (input))
739- input.attrs .insert_or_assign (" revCount" , getRevCount (*input. settings , repoInfo, repoDir, rev));
739+ input.attrs .insert_or_assign (" revCount" , getRevCount (settings, repoInfo, repoDir, rev));
740740
741741 printTalkative (" using revision %s of repo '%s'" , rev.gitRev (), repoInfo.locationToArg ());
742742
@@ -779,8 +779,8 @@ struct GitInputScheme : InputScheme
779779 attrs.insert_or_assign (" submodules" , Explicit<bool >{true });
780780 attrs.insert_or_assign (" lfs" , Explicit<bool >{smudgeLfs});
781781 attrs.insert_or_assign (" allRefs" , Explicit<bool >{true });
782- auto submoduleInput = fetchers::Input::fromAttrs (*input. settings , std::move (attrs));
783- auto [submoduleAccessor, submoduleInput2] = submoduleInput.getAccessor (store);
782+ auto submoduleInput = fetchers::Input::fromAttrs (settings, std::move (attrs));
783+ auto [submoduleAccessor, submoduleInput2] = submoduleInput.getAccessor (settings, store);
784784 submoduleAccessor->setPathDisplay (" «" + submoduleInput.to_string () + " »" );
785785 mounts.insert_or_assign (submodule.path , submoduleAccessor);
786786 }
@@ -797,7 +797,7 @@ struct GitInputScheme : InputScheme
797797 }
798798
799799 std::pair<ref<SourceAccessor>, Input>
800- getAccessorFromWorkdir (ref<Store> store, RepoInfo & repoInfo, Input && input) const
800+ getAccessorFromWorkdir (const Settings & settings, ref<Store> store, RepoInfo & repoInfo, Input && input) const
801801 {
802802 auto repoPath = repoInfo.getPath ().value ();
803803
@@ -829,8 +829,8 @@ struct GitInputScheme : InputScheme
829829 // TODO: fall back to getAccessorFromCommit-like fetch when submodules aren't checked out
830830 // attrs.insert_or_assign("allRefs", Explicit<bool>{ true });
831831
832- auto submoduleInput = fetchers::Input::fromAttrs (*input. settings , std::move (attrs));
833- auto [submoduleAccessor, submoduleInput2] = submoduleInput.getAccessor (store);
832+ auto submoduleInput = fetchers::Input::fromAttrs (settings, std::move (attrs));
833+ auto [submoduleAccessor, submoduleInput2] = submoduleInput.getAccessor (settings, store);
834834 submoduleAccessor->setPathDisplay (" «" + submoduleInput.to_string () + " »" );
835835
836836 /* If the submodule is dirty, mark this repo dirty as
@@ -857,12 +857,12 @@ struct GitInputScheme : InputScheme
857857 input.attrs .insert_or_assign (" rev" , rev.gitRev ());
858858 if (!getShallowAttr (input)) {
859859 input.attrs .insert_or_assign (
860- " revCount" , rev == nullRev ? 0 : getRevCount (*input. settings , repoInfo, repoPath, rev));
860+ " revCount" , rev == nullRev ? 0 : getRevCount (settings, repoInfo, repoPath, rev));
861861 }
862862
863863 verifyCommit (input, repo);
864864 } else {
865- repoInfo.warnDirty (*input. settings );
865+ repoInfo.warnDirty (settings);
866866
867867 if (repoInfo.workdirInfo .headRev ) {
868868 input.attrs .insert_or_assign (" dirtyRev" , repoInfo.workdirInfo .headRev ->gitRev () + " -dirty" );
@@ -874,14 +874,14 @@ struct GitInputScheme : InputScheme
874874
875875 input.attrs .insert_or_assign (
876876 " lastModified" ,
877- repoInfo.workdirInfo .headRev
878- ? getLastModified (*input.settings , repoInfo, repoPath, *repoInfo.workdirInfo .headRev )
879- : 0 );
877+ repoInfo.workdirInfo .headRev ? getLastModified (settings, repoInfo, repoPath, *repoInfo.workdirInfo .headRev )
878+ : 0 );
880879
881880 return {accessor, std::move (input)};
882881 }
883882
884- std::pair<ref<SourceAccessor>, Input> getAccessor (ref<Store> store, const Input & _input) const override
883+ std::pair<ref<SourceAccessor>, Input>
884+ getAccessor (const Settings & settings, ref<Store> store, const Input & _input) const override
885885 {
886886 Input input (_input);
887887
@@ -897,8 +897,8 @@ struct GitInputScheme : InputScheme
897897 }
898898
899899 auto [accessor, final ] = input.getRef () || input.getRev () || !repoInfo.getPath ()
900- ? getAccessorFromCommit (store, repoInfo, std::move (input))
901- : getAccessorFromWorkdir (store, repoInfo, std::move (input));
900+ ? getAccessorFromCommit (settings, store, repoInfo, std::move (input))
901+ : getAccessorFromWorkdir (settings, store, repoInfo, std::move (input));
902902
903903 return {accessor, std::move (final )};
904904 }
@@ -934,7 +934,7 @@ struct GitInputScheme : InputScheme
934934 }
935935 }
936936
937- bool isLocked (const Input & input) const override
937+ bool isLocked (const Settings & settings, const Input & input) const override
938938 {
939939 auto rev = input.getRev ();
940940 return rev && rev != nullRev;
0 commit comments