summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinquize <linquize@yahoo.com.hk>2015-03-20 21:52:49 +0800
committerLinquize <linquize@yahoo.com.hk>2015-03-20 22:26:58 +0800
commit3a977fc0aee71bee29cebd3d373091751e94241f (patch)
tree0c6e4850bba958b1f3decebe3dd9a2f85a035cbe
parentb6f8b486c79a46219dd1d2f3136c411594cc8f6d (diff)
downloadgitea-3a977fc0aee71bee29cebd3d373091751e94241f.tar.gz
gitea-3a977fc0aee71bee29cebd3d373091751e94241f.zip
Allow to migrate through git:// protocol
-rw-r--r--routers/repo/repo.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/repo/repo.go b/routers/repo/repo.go
index 8884bea3ab..d61917a081 100644
--- a/routers/repo/repo.go
+++ b/routers/repo/repo.go
@@ -181,9 +181,9 @@ func MigratePost(ctx *middleware.Context, form auth.MigrateRepoForm) {
}
}
- // Remote address can be HTTP/HTTPS URL or local path.
+ // Remote address can be HTTP/HTTPS/Git URL or local path.
remoteAddr := form.CloneAddr
- if strings.HasPrefix(form.CloneAddr, "http") {
+ if strings.HasPrefix(form.CloneAddr, "http://") || strings.HasPrefix(form.CloneAddr, "https://") || strings.HasPrefix(form.CloneAddr, "git://") {
u, err := url.Parse(form.CloneAddr)
if err != nil {
ctx.Data["Err_CloneAddr"] = true