summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oeqa/utils/git.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/lib/oeqa/utils/git.py b/meta/lib/oeqa/utils/git.py
index ae85d27663..5dd90e0d83 100644
--- a/meta/lib/oeqa/utils/git.py
+++ b/meta/lib/oeqa/utils/git.py
@@ -18,6 +18,10 @@ class GitRepo(object):
18 def __init__(self, path, is_topdir=False): 18 def __init__(self, path, is_topdir=False):
19 self.top_dir = self._run_git_cmd_at(['rev-parse', '--show-toplevel'], 19 self.top_dir = self._run_git_cmd_at(['rev-parse', '--show-toplevel'],
20 path) 20 path)
21 git_dir = self._run_git_cmd_at(['rev-parse', '--git-dir'], path)
22 git_dir = git_dir if os.path.isabs(git_dir) else os.path.join(path, git_dir)
23 self.git_dir = os.path.realpath(git_dir)
24
21 realpath = os.path.realpath(path) 25 realpath = os.path.realpath(path)
22 if is_topdir and realpath != self.top_dir: 26 if is_topdir and realpath != self.top_dir:
23 raise GitError("{} is not a Git top directory".format(realpath)) 27 raise GitError("{} is not a Git top directory".format(realpath))