summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/utils/git.py
Commit message (Collapse)AuthorAgeFilesLines
* meta/lib+scripts: Convert to SPDX license headersRichard Purdie2019-06-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | This adds SPDX license headers in place of the wide assortment of things currently in our script headers. We default to GPL-2.0-only except for the oeqa code where it was clearly submitted and marked as MIT on the most part or some scripts which had the "or later" GPL versioning. The patch also drops other obsolete bits of file headers where they were encoountered such as editor modelines, obsolete maintainer information or the phrase "All rights reserved" which is now obsolete and not required in copyright headers (in this case its actually confusing for licensing as all rights were not reserved). More work is needed for OE-Core but this takes care of the bulk of the scripts and meta/lib directories. The top level LICENSE files are tweaked to match the new structure and the SPDX naming. (From OE-Core rev: 3248a9e3c5a197321b1c4417509b9309cc3bae97) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa.utils.git: use --verify in rev_parse()Markus Lehtonen2017-05-231-1/+1
| | | | | | | | | | | | We use rev-parse for turning git object names into SHA-1 and checking their existence. Using --verify option makes sure git-rev-parse does what we expect. (From OE-Core rev: f5b420c7f07a008c11d492b055c7cc8869f644d3) 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>
* oeqa.utils.git: support bare reposMarkus Lehtonen2017-02-151-4/+12
| | | | | | | | | | [YOCTO #10582] (From OE-Core rev: a223b4d26c8834485cbec1f10defca42301550f7) 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>
* oeqa.utils.git: add git_dir propertyMarkus Lehtonen2017-02-151-0/+4
| | | | | | | | | | [YOCTO #10582] (From OE-Core rev: 5fce33644a58b55d0af6c1775e8f65b426eb4dcb) 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>
* oeqa.utils.git: implement init() methodMarkus Lehtonen2016-08-251-0/+6
| | | | | | | | | | 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>
* oeqa.utils.git.GitRepo: new arg to require topdirMarkus Lehtonen2016-08-251-2/+7
| | | | | | | | | | | | | | | Add a new 'is_topdir' argument to the GitRepo init method which validates that the given path is the top directory of a Git repository. Without this argument GitRepo also accepts subdirectories of a Git repository (in which case GitRepo will point to the parent directory that is the top directory of this repository) which may have undesired in some cases. (From OE-Core rev: 044c81bd916fbe7140d184eb103f74786cfef604) 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>
* oeqa.utils.git: implement GitRepo.get_current_branch()Markus Lehtonen2016-08-251-0/+8
| | | | | | | | (From OE-Core rev: dcba2302adab47b398f1ce7d09c38828ea9ae426) 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>
* oeqa.utils.git: introduce GitRepo.rev_parse()Markus Lehtonen2016-08-251-0/+7
| | | | | | | | (From OE-Core rev: 55726e931536ed0cbd7b80588060b05a3145c934) 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>
* oeqa.utils.git: support git commands with updated envMarkus Lehtonen2016-08-251-2/+6
| | | | | | | | | | | | Extend GitRepo.run_cmd so that the caller may redefine and/or define additional environment variables that will be used when the git command is run. (From OE-Core rev: 9b3c7c47f5d0fa473fe1db81b59b26531414781c) 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>
* oeqa.utils: add git moduleMarkus Lehtonen2016-07-011-0/+38
A new helper module for easier interaction with Git repositories. Provides GitRepo class that represents one local Git repository clone. The GitRepo class currently only has one method, run_cmd(), for running arbitrary git commands in the repository. More specialized methods for commonly used git operations can be added later. (From OE-Core rev: 4eaf434f885afbda03fe67ab6e9ff291c7a9c77e) 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>