From 34102f788945b1c73a845f7916d01d216baa56ad Mon Sep 17 00:00:00 2001 From: Unknwon Date: Wed, 11 Mar 2015 09:21:05 -0400 Subject: remove unused scripts and simplify migrate form definition --- routers/repo/repo.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'routers/repo/repo.go') diff --git a/routers/repo/repo.go b/routers/repo/repo.go index 6b84a389d5..37d07c563f 100644 --- a/routers/repo/repo.go +++ b/routers/repo/repo.go @@ -181,7 +181,7 @@ func MigratePost(ctx *middleware.Context, form auth.MigrateRepoForm) { } } - // Remote address can be HTTPS URL or local path. + // Remote address can be HTTP/HTTPS URL or local path. remoteAddr := form.CloneAddr if strings.HasPrefix(form.CloneAddr, "http") { u, err := url.Parse(form.CloneAddr) @@ -190,8 +190,8 @@ func MigratePost(ctx *middleware.Context, form auth.MigrateRepoForm) { ctx.RenderWithErr(ctx.Tr("form.url_error"), MIGRATE, &form) return } - if len(form.AuthUserName) > 0 || len(form.AuthPasswd) > 0 { - u.User = url.UserPassword(form.AuthUserName, form.AuthPasswd) + if len(form.AuthUsername) > 0 || len(form.AuthPassword) > 0 { + u.User = url.UserPassword(form.AuthUsername, form.AuthPassword) } remoteAddr = u.String() } else if !com.IsDir(remoteAddr) { -- cgit v1.2.3