Rework policies to return branches rather than path strings

This commit is contained in:
trapexit 2025-05-17 16:35:18 -05:00 • committed by GitHub
parent 7e084ea7db
commit 86b50d2d4e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
86 changed files with 1259 additions and 3088 deletions

View file

@ -94,7 +94,7 @@ int
PolicyCache::operator()(const Policy::Search &policy_,
const Branches &branches_,
const char *fusepath_,
StrVec *paths_)
std::vector<Branch*> &paths_)
{
int rv;
Value *v;
@ -118,11 +118,11 @@ PolicyCache::operator()(const Policy::Search &policy_,
pthread_mutex_lock(&_lock);
v->time = now;
v->paths = *paths_;
v->paths = paths_;
}
else
{
*paths_ = v->paths;
paths_ = v->paths;
}
pthread_mutex_unlock(&_lock);