mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Remove git.Command.Run and git.Command.RunInDir* (#19280)
				
					
				
			Follows #19266, #8553, Close #18553, now there are only three `Run..(&RunOpts{})` functions. * before: `stdout, err := RunInDir(path)` * now: `stdout, _, err := RunStdString(&git.RunOpts{Dir:path})`
This commit is contained in:
		@@ -111,9 +111,9 @@ func CreateRepository(doer, u *user_model.User, opts models.CreateRepoOptions) (
 | 
			
		||||
			return fmt.Errorf("checkDaemonExportOK: %v", err)
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		if stdout, err := git.NewCommand(ctx, "update-server-info").
 | 
			
		||||
		if stdout, _, err := git.NewCommand(ctx, "update-server-info").
 | 
			
		||||
			SetDescription(fmt.Sprintf("CreateRepository(git update-server-info): %s", repoPath)).
 | 
			
		||||
			RunInDir(repoPath); err != nil {
 | 
			
		||||
			RunStdString(&git.RunOpts{Dir: repoPath}); err != nil {
 | 
			
		||||
			log.Error("CreateRepository(git update-server-info) in %v: Stdout: %s\nError: %v", repo, stdout, err)
 | 
			
		||||
			rollbackRepo = repo
 | 
			
		||||
			rollbackRepo.OwnerID = u.ID
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user