diff options
author | Paul Okstad <pokstad@gitlab.com> | 2020-11-12 08:38:30 +0300 |
---|---|---|
committer | Paul Okstad <pokstad@gitlab.com> | 2020-11-20 09:33:51 +0300 |
commit | 9b5d2156d486153baa092e2fa49a6043180b6c53 (patch) | |
tree | 26098ca6533a7c143f024be4e51ae0fe1c3876f3 | |
parent | 9191f8f0f17d3b7a958424f91527aa8d8b4c3fcb (diff) |
Inject config into local repository constructor
-rw-r--r-- | internal/git/repository.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/git/repository.go b/internal/git/repository.go index a11ca8083..1e79d6100 100644 --- a/internal/git/repository.go +++ b/internal/git/repository.go @@ -103,12 +103,14 @@ type Repository interface { // LocalRepository represents a local Git repository. type LocalRepository struct { repo repository.GitRepo + cfg config.Cfg } // NewRepository creates a new Repository from its protobuf representation. -func NewRepository(repo repository.GitRepo) *LocalRepository { +func NewRepository(repo repository.GitRepo, cfg config.Cfg) *LocalRepository { return &LocalRepository{ repo: repo, + cfg: cfg, } } |