diff options
-rw-r--r-- | gentoobrowse-api/service/maintenanceGitOperations.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gentoobrowse-api/service/maintenanceGitOperations.cpp b/gentoobrowse-api/service/maintenanceGitOperations.cpp index 3249e0a..1b59e43 100644 --- a/gentoobrowse-api/service/maintenanceGitOperations.cpp +++ b/gentoobrowse-api/service/maintenanceGitOperations.cpp @@ -131,7 +131,7 @@ namespace Gentoo { writeChangesToFileList(int64_t repoId, git_repository * repo, const git_oid & last, const git_oid & head); ChangeSet - refreshRepository(DB::Connection * db, Ice::PropertiesPtr properties, Repository & repository) + refreshRepository(DB::Connection * db, Ice::PropertiesPtr properties, const Repository & repository) { auto targetRef = properties->getProperty("GentooBrowseAPI.RefreshTarget." + repository.name); auto repo = gitSafeGet(git_repository_open, git_repository_free, repository.path.c_str()); @@ -170,7 +170,7 @@ namespace Gentoo { auto repoRoot = std::filesystem::path(properties->getPropertyWithDefault("GentooBrowseAPI.RepoRoot", "/")); auto dbc = db->get(); DB::TransactionScope tx(*dbc.get()); - for (auto & repo : fetch<Gentoo::Repositories>(dbc.get(), sql::maintenance::reposToGitRefresh)) { + for (const auto & repo : fetch<Gentoo::Repositories>(dbc.get(), sql::maintenance::reposToGitRefresh)) { auto changes = refreshRepository(dbc.get(), properties, repo); this->applyFileChanges(dbc.get(), repoRoot, repo, changes); } |