mirror of
https://git.yoctoproject.org/poky
synced 2026-04-19 06:32:13 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
96e8337830
commit
6d9c52fe4b
@@ -35,6 +35,12 @@ class GitRepo(object):
|
||||
cmd_str, ret.status, ret.output))
|
||||
return ret.output.strip()
|
||||
|
||||
@staticmethod
|
||||
def init(path):
|
||||
"""Initialize a new Git repository"""
|
||||
GitRepo._run_git_cmd_at('init', cwd=path)
|
||||
return GitRepo(path, is_topdir=True)
|
||||
|
||||
def run_cmd(self, git_args, env_update=None):
|
||||
"""Run Git command"""
|
||||
env = None
|
||||
|
||||
Reference in New Issue
Block a user