contributor-guide: recommend format.forceInBodyFrom
PATCH 1/1 contributor-guide: recommend format.forceInBodyFrom
We are seeing a lot of patches failing when the From:
line is not contained in the message body. It is probably better to just recommend to force the in-body From: to be present globally.
--- documentation/contributor-guide/submit-changes.rst | 5 +++++ 1 file changed, 5 insertions(+)
documentation/contributor-guide/submit-changes.rst +5 -0
@@ -65,6 +65,11 @@ use to identify your commits:: git config --global user.name "Ada Lovelace" git config --global user.email "[email protected]" +To ensure that your patches are formatted properly, it is also +recommended to set:: + + git config --global format.forceInBodyFrom true + Clone the Git repository for the component to modify ----------------------------------------------------
Signature · 1 line
2.43.2
Quoted 16 lines · Tim Orling via lists.yoctoproject.org
We are seeing a lot of patches failing when the From:
line is not contained in the message body. It is probably better to just recommend to force the in-body From: to be present globally.Signed-off-by Tim Orling <[email protected]>--- documentation/contributor-guide/submit-changes.rst | 5 +++++ 1 file changed, 5 insertions(+)documentation/contributor-guide/submit-changes.rst +0
-0
documentation/contributor-guide/submit-changes.rst use to identify your commits:: · line 72
Quoted 8 lines
documentation/contributor-guide/submit-changes.rst +5
-0@@ -65,6 +65,11 @@ use to identify your commits:: git config --global user.name "Ada Lovelace" git config --global user.email "[email protected]" +To ensure that your patches are formatted properly, it is also +recommended to set:: + + git config --global format.forceInBodyFrom true +
This is good, but we will probably need to clarify that there is a git version dependency here. Git 2.34.1 (at least) doesn't have this option. I'm not sure when it was added. It appears that 2.34 is the version that ships with Ubuntu 22.04
Quoted 15 lines
documentation/contributor-guide/submit-changes.rst +0
-1Clone the Git repository for the component to modify ---------------------------------------------------- --2.43.2
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5199): https://lists.yoctoproject.org/g/docs/message/5199
Mute This Topic: https://lists.yoctoproject.org/mt/105864996/3616693
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/docs/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 22 lines · Joshua Watt via lists.yoctoproject.org
Quoted 6 lines · Tim Orling via lists.yoctoproject.org
We are seeing a lot of patches failing when the From:
line is not contained in the message body. It is probably better to just recommend to force the in-body From: to be present globally.Review
Quoted 6 lines
Signed-off-by Tim Orling <[email protected]>--- documentation/contributor-guide/submit-changes.rst | 5 +++++ 1 file changed, 5 insertions(+)(quoted diff) +0
-0
b/documentation/contributor-guide/submit-changes.rstQuoted 7 lines
index
47a416b24..c292a143a100644documentation/contributor-guide/submit-changes.rst +0
-0@@ -65,6 +65,11 @@ use to identify your commits:: git config --global user.name "Ada Lovelace" git config --global user.email "[email protected]"
Quoted 11 lines
documentation/contributor-guide/submit-changes.rst use to identify your commits:: · line 72
Quoted 5 lines
documentation/contributor-guide/submit-changes.rst +5
-0+To ensure that your patches are formatted properly, it is also +recommended to set:: + + git config --global format.forceInBodyFrom true +This is good, but we will probably need to clarify that there is a git version dependency here. Git 2.34.1 (at least) doesn't have this option. I'm not sure when it was added. It appears that 2.34 is the version that ships with Ubuntu 22.04
Looks like it was introduced in 2.38.0, I think?
https://github.com/git/git/commit/d5fc07df688ace8c5a32f66b358ebd55cdaf4d28
Quoted 22 lines
Quoted 10 lines
documentation/contributor-guide/submit-changes.rst +0
-1Clone the Git repository for the component to modify ---------------------------------------------------- --2.43.2
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#5200):
https://lists.yoctoproject.org/g/docs/message/5200
Mute This Topic: https://lists.yoctoproject.org/mt/105864996/924729
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/docs/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 39 lines · Tim Orling via lists.yoctoproject.org
Quoted 22 lines · Joshua Watt via lists.yoctoproject.org
Quoted 6 lines · Tim Orling via lists.yoctoproject.org
We are seeing a lot of patches failing when the From:
line is not contained in the message body. It is probably better to just recommend to force the in-body From: to be present globally.Review
Quoted 6 lines
Signed-off-by Tim Orling <[email protected]>--- documentation/contributor-guide/submit-changes.rst | 5 +++++ 1 file changed, 5 insertions(+)(quoted diff) +0
-0
b/documentation/contributor-guide/submit-changes.rstQuoted 7 lines
index
47a416b24..c292a143a100644documentation/contributor-guide/submit-changes.rst +0
-0@@ -65,6 +65,11 @@ use to identify your commits:: git config --global user.name "Ada Lovelace" git config --global user.email "[email protected]"Quoted 11 lines
documentation/contributor-guide/submit-changes.rst use to identify your commits:: · line 72
Quoted 5 lines
documentation/contributor-guide/submit-changes.rst +5
-0+To ensure that your patches are formatted properly, it is also +recommended to set:: + + git config --global format.forceInBodyFrom true +This is good, but we will probably need to clarify that there is a git version dependency here. Git 2.34.1 (at least) doesn't have this option. I'm not sure when it was added. It appears that 2.34 is the version that ships with Ubuntu 22.04
Quoted 3 lines
Looks like it was introduced in 2.38.0, I think?
https://github.com/git/git/commit/d5fc07df688ace8c5a32f66b358ebd55cdaf4d28
I had to remind myself how I had git 2.43.2 (on Ubuntu 22.04):
$ cat /etc/apt/sources.list.d/git-core-ubuntu-ppa-jammy.list deb https://ppa.launchpadcontent.net/git-core/ppa/ubuntu/ jammy main # deb-src https://ppa.launchpadcontent.net/git-core/ppa/ubuntu/ jammy main
Quoted 27 lines
Quoted 6 lines
Quoted 6 lines
documentation/contributor-guide/submit-changes.rst +0
-0Clone the Git repository for the component to modify ----------------------------------------------------Quoted 10 lines
Quoted 6 lines
--
2.43.2-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#5202):
https://lists.yoctoproject.org/g/docs/message/5202
Mute This Topic: https://lists.yoctoproject.org/mt/105864996/924729
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/docs/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 15 lines · Tim Orling
We are seeing a lot of patches failing when the From:
line is not contained in the message body. It is probably better to just recommend to force the in-body From: to be present globally.Signed-off-by Tim Orling <[email protected]>--- documentation/contributor-guide/submit-changes.rst | 5 +++++ 1 file changed, 5 insertions(+)documentation/contributor-guide/submit-changes.rst +0
-0
documentation/contributor-guide/submit-changes.rst use to identify your commits:: · line 72
Quoted 8 lines
documentation/contributor-guide/submit-changes.rst +5
-0@@ -65,6 +65,11 @@ use to identify your commits:: git config --global user.name "Ada Lovelace" git config --global user.email "[email protected]" +To ensure that your patches are formatted properly, it is also +recommended to set:: + + git config --global format.forceInBodyFrom true +
I do believe the current documentation already points to a working solution:
https://docs.yoctoproject.org/contributor-guide/submit-changes.html#fixing-your-from-identity
Doesn't that work for you?
Quoted 7 lines
documentation/contributor-guide/submit-changes.rst +0
-0Clone the Git repository for the component to modify ----------------------------------------------------Signature · 1 line
2.43.2
Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Quoted 29 lines · Alexandre Belloni via lists.yoctoproject.org
Quoted 15 lines · Tim Orling
We are seeing a lot of patches failing when the From:
line is not contained in the message body. It is probably better to just recommend to force the in-body From: to be present globally.Signed-off-by Tim Orling <[email protected]>--- documentation/contributor-guide/submit-changes.rst | 5 +++++ 1 file changed, 5 insertions(+)documentation/contributor-guide/submit-changes.rst +0
-0documentation/contributor-guide/submit-changes.rst use to identify your commits:: · line 72
Quoted 8 lines
documentation/contributor-guide/submit-changes.rst +5
-0@@ -65,6 +65,11 @@ use to identify your commits:: git config --global user.name "Ada Lovelace" git config --global user.email "[email protected]" +To ensure that your patches are formatted properly, it is also +recommended to set:: + + git config --global format.forceInBodyFrom true +I do believe the current documentation already points to a working solution:
Quoted 3 lines
https://docs.yoctoproject.org/contributor-guide/submit-changes.html#fixing-your-from-identity
Doesn't that work for you?
Empirically, that is insufficient. I've had that set and it mangled my From line anyway. I beleive that only affects the SMTP header From, when you actually need the "correct" From in the message body as a Git header (which is what format.forceInBodyFrom does). Besides, most people probably already set that anyway because I think it prompts if you don't have it set
Quoted 22 lines
Quoted 8 lines
documentation/contributor-guide/submit-changes.rst +0
-1Clone the Git repository for the component to modify ---------------------------------------------------- --2.43.2
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5205): https://lists.yoctoproject.org/g/docs/message/5205
Mute This Topic: https://lists.yoctoproject.org/mt/105864996/3616693
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/docs/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 34 lines · Joshua Watt
Quoted 31 lines · Alexandre Belloni via lists.yoctoproject.org
Quoted 15 lines · Tim Orling
We are seeing a lot of patches failing when the From:
line is not contained in the message body. It is probably better to just recommend to force the in-body From: to be present globally.Signed-off-by Tim Orling <[email protected]>--- documentation/contributor-guide/submit-changes.rst | 5 +++++ 1 file changed, 5 insertions(+)documentation/contributor-guide/submit-changes.rst +0
-0documentation/contributor-guide/submit-changes.rst use to identify your commits:: · line 72
Quoted 8 lines
documentation/contributor-guide/submit-changes.rst +5
-0@@ -65,6 +65,11 @@ use to identify your commits:: git config --global user.name "Ada Lovelace" git config --global user.email "[email protected]" +To ensure that your patches are formatted properly, it is also +recommended to set:: + + git config --global format.forceInBodyFrom true +I do believe the current documentation already points to a working solution:
https://docs.yoctoproject.org/contributor-guide/submit-changes.html#fixing-your-from-identity
Quoted 8 lines
Quoted 1 line
Doesn't that work for you?
Empirically, that is insufficient. I've had that set and it mangled my From line anyway. I beleive that only affects the SMTP header From, when you actually need the "correct" From in the message body as a Git header (which is what format.forceInBodyFrom does). Besides, most people probably already set that anyway because I think it prompts if you don't have it set
I'm pretty sure this has ensured the From: was in the body for us at Bootlin.
Quoted 23 lines
Quoted 23 lines
Quoted 9 lines
documentation/contributor-guide/submit-changes.rst +0
-1Clone the Git repository for the component to modify ---------------------------------------------------- --2.43.2
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5205): https://lists.yoctoproject.org/g/docs/message/5205
Mute This Topic: https://lists.yoctoproject.org/mt/105864996/3616693
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/docs/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
I have to agree with Alexandre: forceInBodyFrom is not necessary. My setup for poky is:
[user]
email = [email protected]
name = Alexander Kanavin
[sendemail]
smtpEncryption = tls
smtpServer = smtp.gmail.com
smtpUser = [email protected]
smtpServerPort = 587
from = Alexander Kanavin <[email protected]> to = [email protected]
So patches are made with the linutronix identity, but emails are made with gmail identity, and then git send-email adds the extra From: into the email body automatically. No need to force stuff.
You guys need to double check your setup, I think.
Alex
Quoted 79 lines · Alexandre Belloni via lists.yoctoproject.org
Quoted 34 lines · Joshua Watt
Quoted 31 lines · Alexandre Belloni via lists.yoctoproject.org
Quoted 15 lines · Tim Orling
We are seeing a lot of patches failing when the From:
line is not contained in the message body. It is probably better to just recommend to force the in-body From: to be present globally.Signed-off-by Tim Orling <[email protected]>--- documentation/contributor-guide/submit-changes.rst | 5 +++++ 1 file changed, 5 insertions(+)documentation/contributor-guide/submit-changes.rst +0
-0documentation/contributor-guide/submit-changes.rst use to identify your commits:: · line 72
Quoted 8 lines
documentation/contributor-guide/submit-changes.rst +5
-0@@ -65,6 +65,11 @@ use to identify your commits:: git config --global user.name "Ada Lovelace" git config --global user.email "[email protected]" +To ensure that your patches are formatted properly, it is also +recommended to set:: + + git config --global format.forceInBodyFrom true +I do believe the current documentation already points to a working solution:
https://docs.yoctoproject.org/contributor-guide/submit-changes.html#fixing-your-from-identity
Quoted 8 lines
Quoted 1 line
Doesn't that work for you?
Empirically, that is insufficient. I've had that set and it mangled my From line anyway. I beleive that only affects the SMTP header From, when you actually need the "correct" From in the message body as a Git header (which is what format.forceInBodyFrom does). Besides, most people probably already set that anyway because I think it prompts if you don't have it set
I'm pretty sure this has ensured the From: was in the body for us at Bootlin.
Quoted 10 lines
Quoted 10 lines
Quoted 9 lines
documentation/contributor-guide/submit-changes.rst +0
-1Clone the Git repository for the component to modify ---------------------------------------------------- --2.43.2
Quoted 7 lines
Quoted 7 lines
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5207): https://lists.yoctoproject.org/g/docs/message/5207
Mute This Topic: https://lists.yoctoproject.org/mt/105864996/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/docs/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 16 lines · Alexander Kanavin
I have to agree with Alexandre: forceInBodyFrom is not necessary. My setup for poky is:
[user]
email = [email protected]
name = Alexander Kanavin
[sendemail]
smtpEncryption = tls
smtpServer = smtp.gmail.com
smtpUser = [email protected]
smtpServerPort = 587from = Alexander Kanavin <[email protected]> to = [email protected]
Quoted 6 lines
So patches are made with the linutronix identity, but emails are made with gmail identity, and then git send-email adds the extra From: into the email body automatically. No need to force stuff.
You guys need to double check your setup, I think.
The reason for this thread was a comment from RP during the YP Bug Triage meeting that things were different recently, so we are trying to make sure we get this correct.
Either something changed in groups.io or somewhere else, because my setup only added either of these settings today.
I have just sent three emails with the same exact patch but different settings to test-list
(1) both sendemail.from and format.forceInBodyFrom
(2) only sendemail.from
(3) neither sendemail.from nor format.forceInBodyFrom
#3 is also the same conditions I used to send the original patch to the oe-core list.
I would have expected to have heard from Alexandre Belloni previously that there was an issue with my setup in #3.
Quoted 91 lines
Alex
Quoted 12 lines · Alexandre Belloni via lists.yoctoproject.org
Quoted 10 lines · Joshua Watt
Quoted 7 lines · Alexandre Belloni via lists.yoctoproject.org
Quoted 5 lines · Tim Orling
We are seeing a lot of patches failing when the From:
line is not contained in the message body. It is probably better to just recommend to force the in-body From: to be present globally.Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Review
Quoted 6 lines
Signed-off-by Tim Orling <[email protected]>--- documentation/contributor-guide/submit-changes.rst | 5 +++++ 1 file changed, 5 insertions(+)(quoted diff) +0
-0
b/documentation/contributor-guide/submit-changes.rstQuoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
index
47a416b24..c292a143a100644documentation/contributor-guide/submit-changes.rst +0
-0@@ -65,6 +65,11 @@ use to identify your commits:: git config --global user.name "Ada Lovelace" git config --global user.email "[email protected]"Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
documentation/contributor-guide/submit-changes.rst use to identify your commits:: · line 72
Quoted 5 lines
documentation/contributor-guide/submit-changes.rst +5
-0+To ensure that your patches are formatted properly, it is also +recommended to set:: + + git config --global format.forceInBodyFrom true +I do believe the current documentation already points to a working solution:
https://docs.yoctoproject.org/contributor-guide/submit-changes.html#fixing-your-from-identity
Quoted 31 lines
Quoted 9 lines
Quoted 2 lines
Doesn't that work for you?
Empirically, that is insufficient. I've had that set and it mangled my From line anyway. I beleive that only affects the SMTP header From, when you actually need the "correct" From in the message body as a Git header (which is what format.forceInBodyFrom does). Besides, most people probably already set that anyway because I think it prompts if you don't have it set
I'm pretty sure this has ensured the From: was in the body for us at Bootlin.
Quoted 10 lines
Quoted 10 lines
Quoted 9 lines
documentation/contributor-guide/submit-changes.rst +0
-1Clone the Git repository for the component to modify ---------------------------------------------------- --2.43.2
Quoted 7 lines
Quoted 7 lines
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.comQuoted 8 lines
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#5207):https://lists.yoctoproject.org/g/docs/message/5207
Quoted 3 lines
Mute This Topic: https://lists.yoctoproject.org/mt/105864996/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/docs/unsub [Quoted 2 lines
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 10 lines · Tim Orling
The reason for this thread was a comment from RP during the YP Bug Triage meeting that things were different recently, so we are trying to make sure we get this correct. Either something changed in groups.io or somewhere else, because my setup only added either of these settings today.
I have just sent three emails with the same exact patch but different settings to test-list
(1) both sendemail.from and format.forceInBodyFrom
(2) only sendemail.from
(3) neither sendemail.from nor format.forceInBodyFrom#3 is also the same conditions I used to send the original patch to the oe-core list.
I would have expected to have heard from Alexandre Belloni previously that there was an issue with my setup in #3.
Right so my observations are:
- groups.io sometimes mangles From (with this 'via list' stuff) and sometimes it doesn't. I can't see a pattern other than it used to happen less, and lately it seems to happen for everyone including RP :-/
- git will insert From: into the body when the patch author and sendemail.from are not the same (as I set up for myself). It will not do this if they are the same, even when --force-in-body-from is added or set in a global config. I'm not sure what am I doing wrong, but it just doesn't work for me :-/ git is at 2.39.2, so maybe this is fixed in later versions?
Alex
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 6 lines · Alexander Kanavin via lists.yoctoproject.org
- git will insert From: into the body when the patch author and sendemail.from are not the same (as I set up for myself). It will not do this if they are the same, even when --force-in-body-from is added or set in a global config. I'm not sure what am I doing wrong, but it just doesn't work for me :-/ git is at 2.39.2, so maybe this is fixed in later versions?
It's not fixed in later versions. It seems that the force option only has an effect together with --from on the command line, and otherwise does nothing. Which I would say is a defect in git, and even if fixed, the fix will take a while to become widely available.
Does that match your outcomes?
Alex