mirror of
https://git.yoctoproject.org/poky
synced 2026-04-04 05:02:21 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
24433ce8f9
commit
ff63bc403d
@@ -460,6 +460,16 @@ class GitApplyTree(PatchTree):
|
||||
cmd.append('--date="%s"' % date)
|
||||
return (tmpfile, cmd)
|
||||
|
||||
@staticmethod
|
||||
def commitIgnored(subject, dir=None, files=None, d=None):
|
||||
if files:
|
||||
runcmd(['git', 'add'] + files, dir)
|
||||
message = "%s\n\n%s" % (subject, GitApplyTree.ignore_commit_prefix)
|
||||
cmd = ["git"]
|
||||
GitApplyTree.gitCommandUserOptions(cmd, d=d)
|
||||
cmd += ["commit", "-m", message, "--no-verify"]
|
||||
runcmd(cmd, dir)
|
||||
|
||||
@staticmethod
|
||||
def extractPatches(tree, startcommits, outdir, paths=None):
|
||||
import tempfile
|
||||
|
||||
Reference in New Issue
Block a user