fix: Raise an error if no refspec is provided
Only local repositories may be configured without refspec. Raise an error if a repository url is given but refspec is not. Signed-off-by: Tobias Schaffner <tobias.schaffner@siemens.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
		
				
					committed by
					
						 Jan Kiszka
						Jan Kiszka
					
				
			
			
				
	
			
			
			
						parent
						
							d7af4dc678
						
					
				
				
					commit
					1c53b817b5
				
			| @@ -111,6 +111,10 @@ class Repo: | ||||
|         typ = repo_config.get('type', 'git') | ||||
|         refspec = repo_config.get('refspec', | ||||
|                                   repo_defaults.get('refspec', None)) | ||||
|         if refspec is None and url is not None: | ||||
|             logging.error('No refspec specified for repository "%s". This is ' | ||||
|                           'only allowed for local repositories.', name) | ||||
|             sys.exit(1) | ||||
|         path = repo_config.get('path', None) | ||||
|         disable_operations = False | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user