mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 00:20:25 +08:00 
			
		
		
		
	Fix datarace on git.GlobalCommandArgs on tests (#9162)
* fix datarace on git.GlobalCommandArgs on tests * fix tests * fix tests * fix tests
This commit is contained in:
		
				
					committed by
					
						
						Antoine GIRARD
					
				
			
			
				
	
			
			
			
						parent
						
							9d9e6ac411
						
					
				
				
					commit
					7b7d382b8b
				
			@@ -52,6 +52,14 @@ func NewCommand(args ...string) *Command {
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// NewCommandNoGlobals creates and returns a new Git Command based on given command and arguments only with the specify args and don't care global command args
 | 
			
		||||
func NewCommandNoGlobals(args ...string) *Command {
 | 
			
		||||
	return &Command{
 | 
			
		||||
		name: GitExecutable,
 | 
			
		||||
		args: args,
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// AddArguments adds new argument(s) to the command.
 | 
			
		||||
func (c *Command) AddArguments(args ...string) *Command {
 | 
			
		||||
	c.args = append(c.args, args...)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user