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:
parent
171440c0a1
commit
96034e2d9a
@ -394,12 +394,14 @@ class ConfigStatic(Config):
|
||||
if path is None:
|
||||
# In-tree configuration
|
||||
path = os.path.dirname(self.filename)
|
||||
(_, output) = run_cmd(['/usr/bin/git',
|
||||
'rev-parse',
|
||||
'--show-toplevel'],
|
||||
cwd=path,
|
||||
env=self.environ)
|
||||
path = output.strip()
|
||||
(ret, output) = run_cmd(['/usr/bin/git',
|
||||
'rev-parse',
|
||||
'--show-toplevel'],
|
||||
cwd=path,
|
||||
env=self.environ,
|
||||
fail=False)
|
||||
if ret == 0:
|
||||
path = output.strip()
|
||||
|
||||
url = path
|
||||
rep = Repo(url=url,
|
||||
|
Loading…
Reference in New Issue
Block a user