diff options
| author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2024-02-19 02:28:29 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-02-19 16:03:22 +0000 |
| commit | ff63bc403dd8e7201e8408dd8cedbf26280e9640 (patch) | |
| tree | ee88d5701dae77b5a39761ba535fbf9b59f2a76e | |
| parent | 24433ce8f9e091f04a18d2753347f32fb0860999 (diff) | |
| download | poky-ff63bc403dd8e7201e8408dd8cedbf26280e9640.tar.gz | |
lib/oe/patch: Add GitApplyTree.commitIgnored()
This function can be used to create a commit that devtool will ignore
when creating/updating the patches.
(From OE-Core rev: 94f0838b9223b7ece7affaa707e54a5d784da25e)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/lib/oe/patch.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py index 70cdb1d9c0..3ded5f3601 100644 --- a/meta/lib/oe/patch.py +++ b/meta/lib/oe/patch.py | |||
| @@ -461,6 +461,16 @@ class GitApplyTree(PatchTree): | |||
| 461 | return (tmpfile, cmd) | 461 | return (tmpfile, cmd) |
| 462 | 462 | ||
| 463 | @staticmethod | 463 | @staticmethod |
| 464 | def commitIgnored(subject, dir=None, files=None, d=None): | ||
| 465 | if files: | ||
| 466 | runcmd(['git', 'add'] + files, dir) | ||
| 467 | message = "%s\n\n%s" % (subject, GitApplyTree.ignore_commit_prefix) | ||
| 468 | cmd = ["git"] | ||
| 469 | GitApplyTree.gitCommandUserOptions(cmd, d=d) | ||
| 470 | cmd += ["commit", "-m", message, "--no-verify"] | ||
| 471 | runcmd(cmd, dir) | ||
| 472 | |||
| 473 | @staticmethod | ||
| 464 | def extractPatches(tree, startcommits, outdir, paths=None): | 474 | def extractPatches(tree, startcommits, outdir, paths=None): |
| 465 | import tempfile | 475 | import tempfile |
| 466 | import shutil | 476 | import shutil |
