diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2016-08-15 15:19:44 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-08-25 23:03:47 +0100 |
commit | 6d9c52fe4b6c8789bb81bbc469c9f418edaef244 (patch) | |
tree | c3a6c80f75d895f65e27fb4abadd03b6e429d3c7 /meta | |
parent | 96e8337830149f43abfe34a41269dbf10cd055a2 (diff) | |
download | poky-6d9c52fe4b6c8789bb81bbc469c9f418edaef244.tar.gz |
oeqa.utils.git: implement init() method
Method for doing 'git init'.
(From OE-Core rev: c848e1dac68cd859a563a82286f8bc5ddabaa423)
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oeqa/utils/git.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/lib/oeqa/utils/git.py b/meta/lib/oeqa/utils/git.py index ca84680118..ae85d27663 100644 --- a/meta/lib/oeqa/utils/git.py +++ b/meta/lib/oeqa/utils/git.py | |||
@@ -35,6 +35,12 @@ class GitRepo(object): | |||
35 | cmd_str, ret.status, ret.output)) | 35 | cmd_str, ret.status, ret.output)) |
36 | return ret.output.strip() | 36 | return ret.output.strip() |
37 | 37 | ||
38 | @staticmethod | ||
39 | def init(path): | ||
40 | """Initialize a new Git repository""" | ||
41 | GitRepo._run_git_cmd_at('init', cwd=path) | ||
42 | return GitRepo(path, is_topdir=True) | ||
43 | |||
38 | def run_cmd(self, git_args, env_update=None): | 44 | def run_cmd(self, git_args, env_update=None): |
39 | """Run Git command""" | 45 | """Run Git command""" |
40 | env = None | 46 | env = None |