config: Allow in-tree repos not to be in a git repo.
If the repo, where the configuration file resides in (in-tree configuration) is not a git repository, take the directory where the configuration file is located at as the path of this repo instead of failing. This patch does not need to raise the configuration file version, because it does not depend on the configuration file. Signed-off-by: Claudius Heine <ch@denx.de>
This commit is contained in:
		
				
					committed by
					
						
						Daniel Wagner
					
				
			
			
				
	
			
			
			
						parent
						
							171440c0a1
						
					
				
				
					commit
					96034e2d9a
				
			@@ -394,11 +394,13 @@ class ConfigStatic(Config):
 | 
				
			|||||||
                if path is None:
 | 
					                if path is None:
 | 
				
			||||||
                    # In-tree configuration
 | 
					                    # In-tree configuration
 | 
				
			||||||
                    path = os.path.dirname(self.filename)
 | 
					                    path = os.path.dirname(self.filename)
 | 
				
			||||||
                    (_, output) = run_cmd(['/usr/bin/git',
 | 
					                    (ret, output) = run_cmd(['/usr/bin/git',
 | 
				
			||||||
                                             'rev-parse',
 | 
					                                             'rev-parse',
 | 
				
			||||||
                                             '--show-toplevel'],
 | 
					                                             '--show-toplevel'],
 | 
				
			||||||
                                            cwd=path,
 | 
					                                            cwd=path,
 | 
				
			||||||
                                          env=self.environ)
 | 
					                                            env=self.environ,
 | 
				
			||||||
 | 
					                                            fail=False)
 | 
				
			||||||
 | 
					                    if ret == 0:
 | 
				
			||||||
                        path = output.strip()
 | 
					                        path = output.strip()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                url = path
 | 
					                url = path
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user