]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
patchtest: repo: refactor to use GitPython
authorTrevor Gamblin <tgamblin@baylibre.com>
Fri, 3 May 2024 13:10:30 +0000 (09:10 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 13 May 2024 15:28:33 +0000 (16:28 +0100)
commit8ab3a0d7cb68746d7b7e1c7ff8bdf9a84a4d075d
tree0502f80cd5262123785c3ab22ad23dd1a5255084
parentdd4e4adfe91333fbd52d1441e2864a570e0dd073
patchtest: repo: refactor to use GitPython

The repo module currently uses a custom _exec() function in order to run
various git commands as part of the patchtest setup/test process. These
can more efficiently be done with the GitPython module, so use that
instead and reduce the amount of custom code to be maintained for
patchtest in the process. Some specifics replaced using GitPython:

- get branch list
- use repo.active_branch to determine current branch
- use execute() for checkout, merge check, abort, rev-parse, reset

The _exec() function is removed entirely with this change.

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/patchtest/repo.py