summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author无闻 <u@gogs.io>2015-03-24 19:28:55 -0400
committer无闻 <u@gogs.io>2015-03-24 19:28:55 -0400
commitf7219b0cf054a4313fd5753dee992c47be145de3 (patch)
tree1de69d68281e85d55986da921db3ab87ebccd784
parent8061447f0e81eddf9bf2de4f8f66d7453a741a0b (diff)
parent3a977fc0aee71bee29cebd3d373091751e94241f (diff)
downloadgitea-f7219b0cf054a4313fd5753dee992c47be145de3.tar.gz
gitea-f7219b0cf054a4313fd5753dee992c47be145de3.zip
Merge pull request #1105 from linquize/migrate-git
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