aboutsummaryrefslogtreecommitdiff
path: root/internal/rtree/repo.go
diff options
context:
space:
mode:
authorStefan Majewsky <stefan.majewsky@sap.com>2022-04-01 14:35:33 +0200
committerGitHub <noreply@github.com>2022-04-01 14:35:33 +0200
commitbe0e424eecec3fec19ba3518f8fd1bb07b6908dc (patch)
tree81229238e7cd25f1ad248da2c16e523d529cfd72 /internal/rtree/repo.go
parentd35e5fb09bfac1fa381e4ed004ea24a6025e36f4 (diff)
parent1c5cc4947add7cfc5fdbe0cce1e67450ce5d2bd3 (diff)
downloadgofu-be0e424eecec3fec19ba3518f8fd1bb07b6908dc.tar.gz
Merge pull request #8 from SuperSandro2000/dot-git
Always append .git when searching to better support copied URLs from GitHub UI
Diffstat (limited to 'internal/rtree/repo.go')
-rw-r--r--internal/rtree/repo.go5
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) {