summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2019-07-16 21:40:30 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2019-07-16 21:40:30 +0100
commit4e12c0e35c2be9e2d9dc5a1d218e93b25598c9a0 (patch)
treece431cf74aaf0ea2cca9e185249c44289a8cba4a
parentUpdate mask processor for change in date format (diff)
downloadgentoobrowse-api-4e12c0e35c2be9e2d9dc5a1d218e93b25598c9a0.tar.bz2
gentoobrowse-api-4e12c0e35c2be9e2d9dc5a1d218e93b25598c9a0.tar.xz
gentoobrowse-api-4e12c0e35c2be9e2d9dc5a1d218e93b25598c9a0.zip
Repo should be const
-rw-r--r--gentoobrowse-api/service/maintenanceGitOperations.cpp4
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);
}