aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
author无闻 <u@gogs.io>2015-02-17 16:18:26 -0500
committer无闻 <u@gogs.io>2015-02-17 16:18:26 -0500
commit4e18bbf1cf8752677ae021a5db02132edb504982 (patch)
tree95c72c548ad48163c72534a05853eb0faadf007d /modules
parentd85366930c94145c8f1119ff0b6bb95d77c5200e (diff)
parente6fc58a74461bd67efb06fc2e5658265ede2edb5 (diff)
Merge pull request #963 from phsmit/goget
Remove GoGet option from repository and handle it with ?go-get=1 instead
Diffstat (limited to 'modules')
-rw-r--r--modules/auth/repo_form.go1
-rw-r--r--modules/middleware/repo.go3
2 files changed, 1 insertions, 3 deletions
diff --git a/modules/auth/repo_form.go b/modules/auth/repo_form.go
index 36e62f04..c771dd59 100644
--- a/modules/auth/repo_form.go
+++ b/modules/auth/repo_form.go
@@ -52,7 +52,6 @@ type RepoSettingForm struct {
Branch string `form:"branch"`
Interval int `form:"interval"`
Private bool `form:"private"`
- GoGet bool `form:"goget"`
}
func (f *RepoSettingForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go
index 1ab158dd..67a9eda6 100644
--- a/modules/middleware/repo.go
+++ b/modules/middleware/repo.go
@@ -394,8 +394,7 @@ func RepoAssignment(redirect bool, args ...bool) macaron.Handler {
}
ctx.Data["CloneLink"] = ctx.Repo.CloneLink
- if ctx.Repo.Repository.IsGoget {
- ctx.Data["GoGetLink"] = fmt.Sprintf("%s%s/%s", setting.AppUrl, u.LowerName, repo.LowerName)
+ if ctx.Query("go-get") == "1" {
ctx.Data["GoGetImport"] = fmt.Sprintf("%s/%s/%s", setting.Domain, u.LowerName, repo.LowerName)
}