mirror of
				https://gitea.com/gitea/tea.git
				synced 2025-11-04 03:05:26 +01:00 
			
		
		
		
	add debug mode and update readme (#805)
Fix #456 Fix #207 Reviewed-on: https://gitea.com/gitea/tea/pulls/805
This commit is contained in:
		@@ -10,6 +10,7 @@ import (
 | 
			
		||||
	"code.gitea.io/tea/cmd/flags"
 | 
			
		||||
	"code.gitea.io/tea/modules/config"
 | 
			
		||||
	"code.gitea.io/tea/modules/context"
 | 
			
		||||
	"code.gitea.io/tea/modules/debug"
 | 
			
		||||
	"code.gitea.io/tea/modules/git"
 | 
			
		||||
	"code.gitea.io/tea/modules/interact"
 | 
			
		||||
	"code.gitea.io/tea/modules/task"
 | 
			
		||||
@@ -68,12 +69,15 @@ func runRepoClone(ctx stdctx.Context, cmd *cli.Command) error {
 | 
			
		||||
		return err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	debug.Printf("Cloning repository %s into %s", url.String(), dir)
 | 
			
		||||
 | 
			
		||||
	owner, repo = utils.GetOwnerAndRepo(url.Path, login.User)
 | 
			
		||||
	if url.Host != "" {
 | 
			
		||||
		login = config.GetLoginByHost(url.Host)
 | 
			
		||||
		if login == nil {
 | 
			
		||||
			return fmt.Errorf("No login configured matching host '%s', run `tea login add` first", url.Host)
 | 
			
		||||
		}
 | 
			
		||||
		debug.Printf("Matched login '%s' for host '%s'", login.Name, url.Host)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	_, err = task.RepoClone(
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user