aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
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 c8e1aaee..cd13d4ef 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: