diff options
| author | Sandro Jäckel <sandro.jaeckel@sap.com> | 2022-04-01 14:09:36 +0200 |
|---|---|---|
| committer | Sandro Jäckel <sandro.jaeckel@sap.com> | 2022-04-01 14:32:56 +0200 |
| commit | 2dd6ab16c2346a7d7ed8f9b740f33457573dfdd7 (patch) | |
| tree | bb753aeaae225fe14162cfe2387e3619b538f8e8 /internal/rtree/repo.go | |
| parent | d35e5fb09bfac1fa381e4ed004ea24a6025e36f4 (diff) | |
| download | gofu-2dd6ab16c2346a7d7ed8f9b740f33457573dfdd7.tar.gz | |
Add repo.GitDirPath() and use it
Diffstat (limited to 'internal/rtree/repo.go')
| -rw-r--r-- | internal/rtree/repo.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/rtree/repo.go b/internal/rtree/repo.go index 59f3811..f710666 100644 --- a/internal/rtree/repo.go +++ b/internal/rtree/repo.go @@ -49,6 +49,11 @@ func (r Repo) AbsolutePath() string { return filepath.Join(RootPath, r.CheckoutPath) } +//GitDirPath returns the path of the .git directory of this repo. +func (r Repo) GitDirPath() string { + return filepath.Join(r.AbsolutePath(), ".git") +} + //NewRepoFromAbsolutePath initializes a Repo instance by scanning the existing //checkout at the given path. func NewRepoFromAbsolutePath(path string) (repo Repo, err error) { |
