summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-04-13 04:08:25 -0400
committerUnknown <joe2010xtmf@163.com>2014-04-13 04:08:25 -0400
commitd26a333dfbd47e9b6f92fad7fcd779ad72070f8a (patch)
treeb4579585ff66f541f718f850efacecca3c5e3c12 /modules
parent9d983f27d69b72f42eeb833cb0f38e78e3819839 (diff)
downloadgitea-d26a333dfbd47e9b6f92fad7fcd779ad72070f8a.tar.gz
gitea-d26a333dfbd47e9b6f92fad7fcd779ad72070f8a.zip
go get
Diffstat (limited to 'modules')
-rw-r--r--modules/middleware/repo.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go
index c8e1aaee72..cd13d4ef49 100644
--- a/modules/middleware/repo.go
+++ b/modules/middleware/repo.go
@@ -134,6 +134,10 @@ func RepoAssignment(redirect bool, args ...bool) martini.Handler {
ctx.Repo.CloneLink.HTTPS = fmt.Sprintf("%s%s/%s.git", base.AppUrl, user.LowerName, repo.LowerName)
ctx.Data["CloneLink"] = ctx.Repo.CloneLink
+ if ctx.Repo.Repository.IsGoget {
+ ctx.Data["GoGetLink"] = strings.TrimSuffix(ctx.Repo.CloneLink.HTTPS, ".git")
+ }
+
// when repo is bare, not valid branch
if !ctx.Repo.Repository.IsBare && validBranch {
detect: