diff options
author | Sami Hiltunen <shiltunen@gitlab.com> | 2023-04-04 21:20:46 +0300 |
---|---|---|
committer | Sami Hiltunen <shiltunen@gitlab.com> | 2023-04-07 10:19:47 +0300 |
commit | 3b59264afbedc015727d4783f2ac2da9809b9c1a (patch) | |
tree | 5605ccc2ef6d74afdaf9072eaeb120feb4380aab /internal/streamcache | |
parent | ccdfef925ac6fd2264d456f438faa0ca7adaffc2 (diff) |
Move FixDirectoryPermissions to perm package
In order to support quarantining a localrepo.Repo instance, we'd
have to export the quarantining logic from the 'quarantine' package
to avoid reimplementing it. If we do that, and import 'quarantine'
package in the 'localrepo' package, we'll end up with a cyclic import
as the 'housekeeping' package uses 'localrepo', and 'tempdir' package
uses 'housekeeping'. Let's break this import cycle by moving the shared
functionality from the 'housekeeping' package to 'perm' package that can
be imported by 'tempdir' without ending up in a cycle.
Diffstat (limited to 'internal/streamcache')
-rw-r--r-- | internal/streamcache/filestore.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/internal/streamcache/filestore.go b/internal/streamcache/filestore.go index 03b623320..a6969ac61 100644 --- a/internal/streamcache/filestore.go +++ b/internal/streamcache/filestore.go @@ -14,7 +14,6 @@ import ( "github.com/prometheus/client_golang/prometheus/promauto" "github.com/sirupsen/logrus" "gitlab.com/gitlab-org/gitaly/v15/internal/dontpanic" - "gitlab.com/gitlab-org/gitaly/v15/internal/git/housekeeping" "gitlab.com/gitlab-org/gitaly/v15/internal/helper/perm" ) @@ -162,7 +161,7 @@ func (fs *filestore) Stop() { func (fs *filestore) cleanWalk(cutoff time.Time) error { // If a server reset has left some directories in a bad state, this will // fix it. - if err := housekeeping.FixDirectoryPermissions(context.Background(), fs.dir); err != nil { + if err := perm.FixDirectoryPermissions(context.Background(), fs.dir); err != nil { return err } |