diff options
author | Unknown <joe2010xtmf@163.com> | 2014-04-13 04:08:25 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-04-13 04:08:25 -0400 |
commit | d26a333dfbd47e9b6f92fad7fcd779ad72070f8a (patch) | |
tree | b4579585ff66f541f718f850efacecca3c5e3c12 /modules | |
parent | 9d983f27d69b72f42eeb833cb0f38e78e3819839 (diff) | |
download | gitea-d26a333dfbd47e9b6f92fad7fcd779ad72070f8a.tar.gz gitea-d26a333dfbd47e9b6f92fad7fcd779ad72070f8a.zip |
go get
Diffstat (limited to 'modules')
-rw-r--r-- | modules/middleware/repo.go | 4 |
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: |