aboutsummaryrefslogtreecommitdiffstats
path: root/models/repo.go
diff options
context:
space:
mode:
authorEthan Koenig <ethantkoenig@gmail.com>2017-12-02 21:29:41 -0800
committerLunny Xiao <xiaolunwen@gmail.com>2017-12-03 13:29:41 +0800
commita0964775abf35429f3e1e23c93d3a548dc2def4a (patch)
tree62def24ce586856e494ca7ab2b4bd826db807f38 /models/repo.go
parent3163abedd6c3814d04b380c036ca19a7bffe908f (diff)
downloadgitea-a0964775abf35429f3e1e23c93d3a548dc2def4a.tar.gz
gitea-a0964775abf35429f3e1e23c93d3a548dc2def4a.zip
Sanitize logs for mirror sync (#3057)
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 a9f0d93031..3142b324f1 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