diff options
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) { |
