mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-04 10:44:12 +01:00 
			
		
		
		
	Allow to migrate through git:// protocol
This commit is contained in:
		
							parent
							
								
									b6f8b486c7
								
							
						
					
					
						commit
						3a977fc0ae
					
				@ -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
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user