summaryrefslogtreecommitdiffstats
path: root/models/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/repo.go')
-rw-r--r--models/repo.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/models/repo.go b/models/repo.go
index 8d57ae51a5..c570acd6f8 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -605,9 +605,14 @@ func (repo *Repository) RepoPath() string {
return repo.repoPath(x)
}
+// GitConfigPath returns the path to a repository's git config/ directory
+func GitConfigPath(repoPath string) string {
+ return filepath.Join(repoPath, "config")
+}
+
// GitConfigPath returns the repository git config path
func (repo *Repository) GitConfigPath() string {
- return filepath.Join(repo.RepoPath(), "config")
+ return GitConfigPath(repo.RepoPath())
}
// RelLink returns the repository relative link