From: Yoann Congal <[email protected]> To workaround issues with groups.io/list.openembedded.org/lists.yoctoproject.org rewriting "From:" email header, users are encouraged to put a "From:" header inside the mail body.
When using the suggested git-send-email workflow, users may use the git configs format.from=true and format.forceInBodyFrom=true: man git-config: > format.from > Provides the default value for the --from option to > format-patch. Accepts a boolean value, or a name and email > address. If false, format-patch defaults to --no-from, using > commit authors directly in the "From:" field of patch mails. > If true, format-patch defaults to --from, using your committer > identity in the "From:" field of patch mails and including a > "From:" field in the body of the patch mail if different. If > set to a non-boolean value, format-patch uses that value > instead of your committer identity. Defaults to false. > > format.forceInBodyFrom > Provides the default value for the --[no-]force-in-body-from > option to format-patch. Defaults to false. Putting those configuration locally in every groups.io related repositories (That means every bitbake-setup repo setup) is tedious, to avoid that the configuration can be made globally (e.g. in ~/.gitconfig): $ git config --global format.from true $ git config --global format.forceInBodyFrom true ... but then it applies to the devtool workspace. With this configuration, devtool generated patches look like: |From 4457b9d7805551e6b35efa25f998b63901d4bf86 Mon Sep 17 00:00:00 2001 |From: Yoann Congal <[email protected]> |Subject: [PATCH] Add a new line | |From: Original Author <[email protected]> | |[rest of the patch] Notice the duplicated "From:" header. To fix the double "From:" header, use the --no-from option for git-format-patch to override this configuration and generate only one "From: Original Author <...>" header. "--no-from" is the git global default, so this is a noop for users with default configuration. Note: The "format.from" configuration is in git since v2.10 (in 2016), and the --no-from option before that. Signed-off-by: Yoann Congal <[email protected]> --- Cc: Alexander Kanavin <[email protected]> v1->v2: * add more context in commit message following Alex's review: https://lore.kernel.org/all/[email protected]/T/#mccc1ffe8c4e39a51924cc907857ae1e767632333 --- meta/lib/oe/patch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py index 1d50e83ab7a..0a201afe0ad 100644 --- a/meta/lib/oe/patch.py +++ b/meta/lib/oe/patch.py @@ -530,7 +530,7 @@ class GitApplyTree(PatchTree): patches = [] try: for name, rev in startcommits.items(): - cmd = ["git", "format-patch", "--no-signature", "--no-numbered", rev, "-o", tempdir] + cmd = ["git", "format-patch", "--no-from", "--no-signature", "--no-numbered", rev, "-o", tempdir] if paths: cmd.append('--') cmd.extend(paths)
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#241255): https://lists.openembedded.org/g/openembedded-core/message/241255 Mute This Topic: https://lists.openembedded.org/mt/120329299/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
