Skip to contentSkip to conversation

oe.patch: fix Git note identity in commitIgnored

PATCH New [email protected] 1 participant 1 message Oct 18

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 oe.patch: fix Git note identity in commitIgnored

From: Roy Cohen <[email protected]>

GitApplyTree.commitIgnored() passes the Git user name and email as positional arguments to addNote(), incorrectly assigning them to value and commituser.

Pass these as keyword arguments to ensure Git notes can be created without relying on global Git configuration.

Add a regression test verifying the note content and Git identity.

Fixes [YOCTO #15989]

---
 meta/lib/oe/patch.py                        |  2 +-
 meta/lib/oeqa/selftest/cases/oelib/patch.py | 46 +++++++++++++++++++++
 2 files changed, 47 insertions(+), 1 deletion(-)
meta/lib/oe/patch.py +1 -1
index 2277e8835d..f8fc63ac00 100644
@@ -520,7 +520,7 @@ class GitApplyTree(PatchTree):
         GitApplyTree.gitCommandUserOptions(cmd, d=d)
         cmd += ["commit", "-m", subject, "--no-verify", "--no-gpg-sign"]
         runcmd(cmd, dir)
-        GitApplyTree.addNote(dir, "HEAD", GitApplyTree.ignore_commit, d.getVar('PATCH_GIT_USER_NAME'), d.getVar('PATCH_GIT_USER_EMAIL'))
+        GitApplyTree.addNote(dir, "HEAD", GitApplyTree.ignore_commit, commituser=d.getVar('PATCH_GIT_USER_NAME'), commitemail=d.getVar('PATCH_GIT_USER_EMAIL'))
 
     @staticmethod
     def extractPatches(tree, startcommits, outdir, paths=None):
meta/lib/oeqa/selftest/cases/oelib/patch.py +46 -0

55 lines not on this page · raw message