[oe-commits] [openembedded-core] 33/50: oeqa.utils.git: implement init() method

git at git.openembedded.org git at git.openembedded.org
Thu Aug 25 22:04:49 UTC 2016


rpurdie pushed a commit to branch master
in repository openembedded-core.

commit c848e1dac68cd859a563a82286f8bc5ddabaa423
Author: Markus Lehtonen <markus.lehtonen at linux.intel.com>
AuthorDate: Mon Aug 15 15:19:44 2016 +0300

    oeqa.utils.git: implement init() method
    
    Method for doing 'git init'.
    
    Signed-off-by: Markus Lehtonen <markus.lehtonen at linux.intel.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/lib/oeqa/utils/git.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/meta/lib/oeqa/utils/git.py b/meta/lib/oeqa/utils/git.py
index ca84680..ae85d27 100644
--- a/meta/lib/oeqa/utils/git.py
+++ b/meta/lib/oeqa/utils/git.py
@@ -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

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list