diff --git a/src/libfetchers-tests/git-utils.cc b/src/libfetchers-tests/git-utils.cc index 9164f7e5b..10e98141f 100644 --- a/src/libfetchers-tests/git-utils.cc +++ b/src/libfetchers-tests/git-utils.cc @@ -79,7 +79,7 @@ TEST_F(GitUtilsTest, sink_basic) // sink->createHardlink("foo-1.1/links/foo-2", CanonPath("foo-1.1/hello")); auto result = repo->dereferenceSingletonDirectory(sink->flush()); - auto accessor = repo->getAccessor(result, false, false); + auto accessor = repo->getAccessor(result, false); auto entries = accessor->readDirectory(CanonPath::root); ASSERT_EQ(entries.size(), 5); ASSERT_EQ(accessor->readFile(CanonPath("hello")), "hello world"); diff --git a/src/libfetchers/git-utils.cc b/src/libfetchers/git-utils.cc index dca97a871..a2761a543 100644 --- a/src/libfetchers/git-utils.cc +++ b/src/libfetchers/git-utils.cc @@ -485,13 +485,15 @@ struct GitRepoImpl : GitRepo, std::enable_shared_from_this /** * A 'GitSourceAccessor' with no regard for export-ignore or any other transformations. */ - ref getRawAccessor(const Hash & rev, bool smudgeLfs); + ref getRawAccessor( + const Hash & rev, + bool smudgeLfs = false); ref getAccessor( const Hash & rev, bool exportIgnore, std::string displayPrefix, - bool smudgeLfs) override; + bool smudgeLfs = false) override; ref getAccessor(const WorkdirInfo & wd, bool exportIgnore, MakeNotAllowedError e) override; @@ -610,7 +612,7 @@ struct GitRepoImpl : GitRepo, std::enable_shared_from_this Hash treeHashToNarHash(const Hash & treeHash) override { - auto accessor = getAccessor(treeHash, false, "", false); + auto accessor = getAccessor(treeHash, false, ""); fetchers::Cache::Key cacheKey{"treeHashToNarHash", {{"treeHash", treeHash.gitRev()}}}; @@ -1187,7 +1189,9 @@ struct GitFileSystemObjectSinkImpl : GitFileSystemObjectSink } }; -ref GitRepoImpl::getRawAccessor(const Hash & rev, bool smudgeLfs) +ref GitRepoImpl::getRawAccessor( + const Hash & rev, + bool smudgeLfs) { auto self = ref(shared_from_this()); return make_ref(self, rev, smudgeLfs); @@ -1238,7 +1242,7 @@ std::vector> GitRepoImpl::getSubmodules /* Read the .gitmodules files from this revision. */ CanonPath modulesFile(".gitmodules"); - auto accessor = getAccessor(rev, exportIgnore, "", false); + auto accessor = getAccessor(rev, exportIgnore, ""); if (!accessor->pathExists(modulesFile)) return {}; /* Parse it and get the revision of each submodule. */ @@ -1249,7 +1253,7 @@ std::vector> GitRepoImpl::getSubmodules std::vector> result; - auto rawAccessor = getRawAccessor(rev, false); + auto rawAccessor = getRawAccessor(rev); for (auto & submodule : parseSubmodules(pathTemp)) { /* Filter out .gitmodules entries that don't exist or are not diff --git a/src/libfetchers/git-utils.hh b/src/libfetchers/git-utils.hh index ba0e69146..c683bd058 100644 --- a/src/libfetchers/git-utils.hh +++ b/src/libfetchers/git-utils.hh @@ -90,7 +90,7 @@ struct GitRepo const Hash & rev, bool exportIgnore, std::string displayPrefix, - bool smudgeLfs) = 0; + bool smudgeLfs = false) = 0; virtual ref getAccessor(const WorkdirInfo & wd, bool exportIgnore, MakeNotAllowedError makeNotAllowedError) = 0; diff --git a/src/libfetchers/github.cc b/src/libfetchers/github.cc index d35998949..ec469df7c 100644 --- a/src/libfetchers/github.cc +++ b/src/libfetchers/github.cc @@ -297,8 +297,7 @@ struct GitArchiveInputScheme : InputScheme auto accessor = getTarballCache()->getAccessor( tarballInfo.treeHash, false, - "«" + input.to_string() + "»", - false); + "«" + input.to_string() + "»"); return {accessor, input}; } diff --git a/src/libfetchers/tarball.cc b/src/libfetchers/tarball.cc index 1ad3b26f4..699612e25 100644 --- a/src/libfetchers/tarball.cc +++ b/src/libfetchers/tarball.cc @@ -119,7 +119,7 @@ static DownloadTarballResult downloadTarball_( .treeHash = treeHash, .lastModified = (time_t) getIntAttr(infoAttrs, "lastModified"), .immutableUrl = maybeGetStrAttr(infoAttrs, "immutableUrl"), - .accessor = getTarballCache()->getAccessor(treeHash, false, displayPrefix, false), + .accessor = getTarballCache()->getAccessor(treeHash, false, displayPrefix), }; };