diff mbox series

contributor-guide: recommend format.forceInBodyFrom

Message ID 20240502152701.1798568-2-tim.orling@konsulko.com
State New
Headers show
Series contributor-guide: recommend format.forceInBodyFrom | expand

Commit Message

Tim Orling May 2, 2024, 3:27 p.m. UTC
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 <tim.orling@konsulko.com>
---
 documentation/contributor-guide/submit-changes.rst | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Joshua Watt May 2, 2024, 3:37 p.m. UTC | #1
On Thu, May 2, 2024 at 9:27 AM Tim Orling via lists.yoctoproject.org
<tim.orling=konsulko.com@lists.yoctoproject.org> wrote:
>
> 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 <tim.orling@konsulko.com>
> ---
>  documentation/contributor-guide/submit-changes.rst | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/documentation/contributor-guide/submit-changes.rst b/documentation/contributor-guide/submit-changes.rst
> index 47a416b24..c292a143a 100644
> --- a/documentation/contributor-guide/submit-changes.rst
> +++ b/documentation/contributor-guide/submit-changes.rst
> @@ -65,6 +65,11 @@ use to identify your commits::
>     git config --global user.name "Ada Lovelace"
>     git config --global user.email "ada.lovelace@gmail.com"
>
> +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

>  Clone 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: docs+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/docs/unsub [JPEWhacker@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Tim Orling May 2, 2024, 4:12 p.m. UTC | #2
On Thu, May 2, 2024 at 8:38 AM Joshua Watt via lists.yoctoproject.org
<JPEWhacker=gmail.com@lists.yoctoproject.org> wrote:

> On Thu, May 2, 2024 at 9:27 AM Tim Orling via lists.yoctoproject.org
> <tim.orling=konsulko.com@lists.yoctoproject.org> wrote:
> >
> > 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 <tim.orling@konsulko.com>
> > ---
> >  documentation/contributor-guide/submit-changes.rst | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/documentation/contributor-guide/submit-changes.rst
> b/documentation/contributor-guide/submit-changes.rst
> > index 47a416b24..c292a143a 100644
> > --- a/documentation/contributor-guide/submit-changes.rst
> > +++ b/documentation/contributor-guide/submit-changes.rst
> > @@ -65,6 +65,11 @@ use to identify your commits::
> >     git config --global user.name "Ada Lovelace"
> >     git config --global user.email "ada.lovelace@gmail.com"
> >
> > +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


>
> >  Clone 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: docs+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/docs/unsub [
> ticotimo@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
Tim Orling May 2, 2024, 4:23 p.m. UTC | #3
On Thu, May 2, 2024 at 9:12 AM Tim Orling via lists.yoctoproject.org
<ticotimo=gmail.com@lists.yoctoproject.org> wrote:

>
>
> On Thu, May 2, 2024 at 8:38 AM Joshua Watt via lists.yoctoproject.org
> <JPEWhacker=gmail.com@lists.yoctoproject.org> wrote:
>
>> On Thu, May 2, 2024 at 9:27 AM Tim Orling via lists.yoctoproject.org
>> <tim.orling=konsulko.com@lists.yoctoproject.org> wrote:
>> >
>> > 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 <tim.orling@konsulko.com>
>> > ---
>> >  documentation/contributor-guide/submit-changes.rst | 5 +++++
>> >  1 file changed, 5 insertions(+)
>> >
>> > diff --git a/documentation/contributor-guide/submit-changes.rst
>> b/documentation/contributor-guide/submit-changes.rst
>> > index 47a416b24..c292a143a 100644
>> > --- a/documentation/contributor-guide/submit-changes.rst
>> > +++ b/documentation/contributor-guide/submit-changes.rst
>> > @@ -65,6 +65,11 @@ use to identify your commits::
>> >     git config --global user.name "Ada Lovelace"
>> >     git config --global user.email "ada.lovelace@gmail.com"
>> >
>> > +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
>

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


>
>
>>
>> >  Clone the Git repository for the component to modify
>> >  ----------------------------------------------------
>> >
>> > --
>> > 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: docs+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/docs/unsub [
> ticotimo@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
Alexandre Belloni May 2, 2024, 7:18 p.m. UTC | #4
On 02/05/2024 08:27:02-0700, Tim Orling wrote:
> 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 <tim.orling@konsulko.com>
> ---
>  documentation/contributor-guide/submit-changes.rst | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/documentation/contributor-guide/submit-changes.rst b/documentation/contributor-guide/submit-changes.rst
> index 47a416b24..c292a143a 100644
> --- a/documentation/contributor-guide/submit-changes.rst
> +++ b/documentation/contributor-guide/submit-changes.rst
> @@ -65,6 +65,11 @@ use to identify your commits::
>     git config --global user.name "Ada Lovelace"
>     git config --global user.email "ada.lovelace@gmail.com"
>  
> +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?

>  Clone the Git repository for the component to modify
>  ----------------------------------------------------
>  
> -- 
> 2.43.2
> 
>
Joshua Watt May 2, 2024, 7:25 p.m. UTC | #5
On Thu, May 2, 2024 at 1:18 PM Alexandre Belloni via
lists.yoctoproject.org
<alexandre.belloni=bootlin.com@lists.yoctoproject.org> wrote:
>
> On 02/05/2024 08:27:02-0700, Tim Orling wrote:
> > 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 <tim.orling@konsulko.com>
> > ---
> >  documentation/contributor-guide/submit-changes.rst | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/documentation/contributor-guide/submit-changes.rst b/documentation/contributor-guide/submit-changes.rst
> > index 47a416b24..c292a143a 100644
> > --- a/documentation/contributor-guide/submit-changes.rst
> > +++ b/documentation/contributor-guide/submit-changes.rst
> > @@ -65,6 +65,11 @@ use to identify your commits::
> >     git config --global user.name "Ada Lovelace"
> >     git config --global user.email "ada.lovelace@gmail.com"
> >
> > +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?

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

>
> >  Clone 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: docs+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/docs/unsub [JPEWhacker@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Alexandre Belloni May 2, 2024, 7:45 p.m. UTC | #6
On 02/05/2024 13:25:54-0600, Joshua Watt wrote:
> On Thu, May 2, 2024 at 1:18 PM Alexandre Belloni via
> lists.yoctoproject.org
> <alexandre.belloni=bootlin.com@lists.yoctoproject.org> wrote:
> >
> > On 02/05/2024 08:27:02-0700, Tim Orling wrote:
> > > 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 <tim.orling@konsulko.com>
> > > ---
> > >  documentation/contributor-guide/submit-changes.rst | 5 +++++
> > >  1 file changed, 5 insertions(+)
> > >
> > > diff --git a/documentation/contributor-guide/submit-changes.rst b/documentation/contributor-guide/submit-changes.rst
> > > index 47a416b24..c292a143a 100644
> > > --- a/documentation/contributor-guide/submit-changes.rst
> > > +++ b/documentation/contributor-guide/submit-changes.rst
> > > @@ -65,6 +65,11 @@ use to identify your commits::
> > >     git config --global user.name "Ada Lovelace"
> > >     git config --global user.email "ada.lovelace@gmail.com"
> > >
> > > +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?
> 
> 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.

> 
> >
> > >  Clone 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: docs+owner@lists.yoctoproject.org
> > Unsubscribe: https://lists.yoctoproject.org/g/docs/unsub [JPEWhacker@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
Alexander Kanavin May 2, 2024, 8:15 p.m. UTC | #7
I have to agree with Alexandre: forceInBodyFrom is not necessary. My
setup for poky is:

[user]
    email = alex@linutronix.de
    name = Alexander Kanavin
[sendemail]
    smtpEncryption = tls
    smtpServer = smtp.gmail.com
    smtpUser = alex.kanavin@gmail.com
    smtpServerPort = 587

    from = Alexander Kanavin <alex.kanavin@gmail.com>
    to = openembedded-core@lists.openembedded.org


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


On Thu, 2 May 2024 at 21:45, Alexandre Belloni via
lists.yoctoproject.org
<alexandre.belloni=bootlin.com@lists.yoctoproject.org> wrote:
>
> On 02/05/2024 13:25:54-0600, Joshua Watt wrote:
> > On Thu, May 2, 2024 at 1:18 PM Alexandre Belloni via
> > lists.yoctoproject.org
> > <alexandre.belloni=bootlin.com@lists.yoctoproject.org> wrote:
> > >
> > > On 02/05/2024 08:27:02-0700, Tim Orling wrote:
> > > > 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 <tim.orling@konsulko.com>
> > > > ---
> > > >  documentation/contributor-guide/submit-changes.rst | 5 +++++
> > > >  1 file changed, 5 insertions(+)
> > > >
> > > > diff --git a/documentation/contributor-guide/submit-changes.rst b/documentation/contributor-guide/submit-changes.rst
> > > > index 47a416b24..c292a143a 100644
> > > > --- a/documentation/contributor-guide/submit-changes.rst
> > > > +++ b/documentation/contributor-guide/submit-changes.rst
> > > > @@ -65,6 +65,11 @@ use to identify your commits::
> > > >     git config --global user.name "Ada Lovelace"
> > > >     git config --global user.email "ada.lovelace@gmail.com"
> > > >
> > > > +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?
> >
> > 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.
>
> >
> > >
> > > >  Clone 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
> > >
> > >
> > >
>
> --
> 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: docs+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/docs/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Tim Orling May 2, 2024, 8:22 p.m. UTC | #8
On Thu, May 2, 2024 at 1:16 PM Alexander Kanavin <alex.kanavin@gmail.com>
wrote:

> I have to agree with Alexandre: forceInBodyFrom is not necessary. My
> setup for poky is:
>
> [user]
>     email = alex@linutronix.de
>     name = Alexander Kanavin
> [sendemail]
>     smtpEncryption = tls
>     smtpServer = smtp.gmail.com
>     smtpUser = alex.kanavin@gmail.com
>     smtpServerPort = 587
>
>     from = Alexander Kanavin <alex.kanavin@gmail.com>
>     to = openembedded-core@lists.openembedded.org
>
>
> 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.




>
> Alex
>
>
> On Thu, 2 May 2024 at 21:45, Alexandre Belloni via
> lists.yoctoproject.org
> <alexandre.belloni=bootlin.com@lists.yoctoproject.org> wrote:
> >
> > On 02/05/2024 13:25:54-0600, Joshua Watt wrote:
> > > On Thu, May 2, 2024 at 1:18 PM Alexandre Belloni via
> > > lists.yoctoproject.org
> > > <alexandre.belloni=bootlin.com@lists.yoctoproject.org> wrote:
> > > >
> > > > On 02/05/2024 08:27:02-0700, Tim Orling wrote:
> > > > > 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 <tim.orling@konsulko.com>
> > > > > ---
> > > > >  documentation/contributor-guide/submit-changes.rst | 5 +++++
> > > > >  1 file changed, 5 insertions(+)
> > > > >
> > > > > diff --git a/documentation/contributor-guide/submit-changes.rst
> b/documentation/contributor-guide/submit-changes.rst
> > > > > index 47a416b24..c292a143a 100644
> > > > > --- a/documentation/contributor-guide/submit-changes.rst
> > > > > +++ b/documentation/contributor-guide/submit-changes.rst
> > > > > @@ -65,6 +65,11 @@ use to identify your commits::
> > > > >     git config --global user.name "Ada Lovelace"
> > > > >     git config --global user.email "ada.lovelace@gmail.com"
> > > > >
> > > > > +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?
> > >
> > > 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.
> >
> > >
> > > >
> > > > >  Clone 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
> > > >
> > > >
> > > >
> >
> > --
> > 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: docs+owner@lists.yoctoproject.org
> > Unsubscribe: https://lists.yoctoproject.org/g/docs/unsub [
> alex.kanavin@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
>
Alexander Kanavin May 2, 2024, 8:53 p.m. UTC | #9
On Thu, 2 May 2024 at 22:23, Tim Orling <tim.orling@konsulko.com> wrote:
> 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
Alexander Kanavin May 3, 2024, 9:23 a.m. UTC | #10
On Thu, 2 May 2024 at 22:54, Alexander Kanavin via
lists.yoctoproject.org <alex.kanavin=gmail.com@lists.yoctoproject.org>
wrote:
> - 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
diff mbox series

Patch

diff --git a/documentation/contributor-guide/submit-changes.rst b/documentation/contributor-guide/submit-changes.rst
index 47a416b24..c292a143a 100644
--- a/documentation/contributor-guide/submit-changes.rst
+++ b/documentation/contributor-guide/submit-changes.rst
@@ -65,6 +65,11 @@  use to identify your commits::
    git config --global user.name "Ada Lovelace"
    git config --global user.email "ada.lovelace@gmail.com"
 
+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
 ----------------------------------------------------