# git-send-email is omitting author and date lines

9 messages from 2007-09-23 to 2007-09-24. Participants: Hanspeter Kunz, Junio C Hamano, Johannes Schindelin, martin f krafft.
Thread: https://gitlist.dev/t/9982

## Hanspeter Kunz, 2007-09-23 22:13

Subject: git-send-email is omitting author and date lines
Message-ID: <1190585633.29937.44.camel@localhost>
URL: https://gitlist.dev/e/1190585633.29937.44.camel%40localhost

```
Hi,

sorry if this is a stupid question, but I'm new to git.

When sending a patch to myself using `git-send-email` I realized that
the lines containing the author and the date (lines 5 and 6 in the patch
file) were not in the sent email.

Is this on purpose? And if so, why?

Thanks,
Hp.

```

## Junio C Hamano, 2007-09-23 23:29

Subject: Re: git-send-email is omitting author and date lines
Message-ID: <7v4phlc668.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7v4phlc668.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <1190585633.29937.44.camel@localhost>

```
Hanspeter Kunz <hp@edelkunz.ch> writes:

> When sending a patch to myself using `git-send-email` I realized that
> the lines containing the author and the date (lines 5 and 6 in the patch
> file) were not in the sent email.

Was the commit authored by yourself?

```

## Hanspeter Kunz, 2007-09-23 23:35

Subject: Re: git-send-email is omitting author and date lines
Message-ID: <1190590538.12557.1.camel@localhost>
URL: https://gitlist.dev/e/1190590538.12557.1.camel%40localhost
In-Reply-To: <7v4phlc668.fsf@gitster.siamese.dyndns.org>

```
On Sun, 2007-09-23 at 16:29 -0700, Junio C Hamano wrote:
> Hanspeter Kunz <hp@edelkunz.ch> writes:
> 
> > When sending a patch to myself using `git-send-email` I realized that
> > the lines containing the author and the date (lines 5 and 6 in the patch
> > file) were not in the sent email.
> 
> Was the commit authored by yourself?

yes. does this make a difference?

```

## Johannes Schindelin, 2007-09-24 00:30

Subject: Re: git-send-email is omitting author and date lines
Message-ID: <Pine.LNX.4.64.0709240129450.28395@racer.site>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0709240129450.28395%40racer.site
In-Reply-To: <1190590538.12557.1.camel@localhost>

```
Hi,

On Mon, 24 Sep 2007, Hanspeter Kunz wrote:

> On Sun, 2007-09-23 at 16:29 -0700, Junio C Hamano wrote:
> > Hanspeter Kunz <hp@edelkunz.ch> writes:
> > 
> > > When sending a patch to myself using `git-send-email` I realized that
> > > the lines containing the author and the date (lines 5 and 6 in the patch
> > > file) were not in the sent email.
> > 
> > Was the commit authored by yourself?
> 
> yes. does this make a difference?

Yes, it does.  The author is usually inferred from the sender of the mail, 
and therefore git-send-email strips that information from the message 
(IIRC).

Hth,
Dscho

```

## Hanspeter Kunz, 2007-09-24 07:16

Subject: Re: git-send-email is omitting author and date lines
Message-ID: <1190618182.6916.1.camel@localhost>
URL: https://gitlist.dev/e/1190618182.6916.1.camel%40localhost
In-Reply-To: <Pine.LNX.4.64.0709240129450.28395@racer.site>

```
On Mon, 2007-09-24 at 01:30 +0100, Johannes Schindelin wrote:
> Hi,
> 
> On Mon, 24 Sep 2007, Hanspeter Kunz wrote:
> 
> > On Sun, 2007-09-23 at 16:29 -0700, Junio C Hamano wrote:
> > > Hanspeter Kunz <hp@edelkunz.ch> writes:
> > > 
> > > > When sending a patch to myself using `git-send-email` I realized that
> > > > the lines containing the author and the date (lines 5 and 6 in the patch
> > > > file) were not in the sent email.
> > > 
> > > Was the commit authored by yourself?
> > 
> > yes. does this make a difference?
> 
> Yes, it does.  The author is usually inferred from the sender of the mail, 
> and therefore git-send-email strips that information from the message 
> (IIRC).

Ah, I see. And this applies also to the date, I guess.

Many thanks,
Hp.

```

## martin f krafft, 2007-09-24 11:08

Subject: Re: git-send-email is omitting author and date lines
Message-ID: <20070924110817.GA15797@lapse.madduck.net>
URL: https://gitlist.dev/e/20070924110817.GA15797%40lapse.madduck.net
In-Reply-To: <7v4phlc668.fsf@gitster.siamese.dyndns.org>

```
also sprach Junio C Hamano <gitster@pobox.com> [2007.09.24.0029 +0100]:
> Was the commit authored by yourself?

Sorry for barking in here, but Hanspeter tried to submit a patch to
me and that's when this issue arose.

Yes, he is the author of the commit, as in: user.name and user.email
are the same for the commit and for the email, and this seems to be
the reason the commit header is left out of the email, causing
git-am to use the RFC822 From header instead:

  - patch by Jane, email sent From Jane: no separate From header
  - patch by Jane, email sent From Joe: separate From Jane header 

But information *does* get lost, namely the date. If I send a patch
by email and it gets merged by the recipient, the date of the commit
will be the date of the email, not the date of original commit, or
when it was merged.

To be honest, I have no real preference on this, but it just seems
strange that out of three dates:

  - original commit
  - email sent
  - commit merged

git-send-email/git-am cause the second to be used, which is the
one that makes the *least* sense IMHO.

-- 
martin;              (greetings from the heart of the sun.)
  \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
 
"i dislike arguments of any kind. they are always vulgar, and often
 convincing."
                                                        -- oscar wilde
 
spamtraps: madduck.bogus@madduck.net

```

## Johannes Schindelin, 2007-09-24 11:10

Subject: Re: git-send-email is omitting author and date lines
Message-ID: <Pine.LNX.4.64.0709241209470.28395@racer.site>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0709241209470.28395%40racer.site
In-Reply-To: <20070924110817.GA15797@lapse.madduck.net>

```
Hi,

On Mon, 24 Sep 2007, martin f krafft wrote:

> But information *does* get lost, namely the date. If I send a patch
> by email and it gets merged by the recipient, the date of the commit
> will be the date of the email, not the date of original commit, or
> when it was merged.

And that is perfectly okay, since as far as the public is concerned, this 
is the date of the patch.

Ciao,
Dscho

```

## martin f krafft, 2007-09-24 17:30

Subject: Re: git-send-email is omitting author and date lines
Message-ID: <20070924173014.GB27816@lapse.madduck.net>
URL: https://gitlist.dev/e/20070924173014.GB27816%40lapse.madduck.net
In-Reply-To: <Pine.LNX.4.64.0709241209470.28395@racer.site>

```
also sprach Johannes Schindelin <Johannes.Schindelin@gmx.de> [2007.09.24.1210 +0100]:
> And that is perfectly okay, since as far as the public is
> concerned, this is the date of the patch.

If you say so. I don't find this at all convincing.

-- 
martin;              (greetings from the heart of the sun.)
  \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
 
"if i am occasionally a little overdressed, i make up for it by being
 always immensely over-educated."
                                                        -- oscar wilde
 
spamtraps: madduck.bogus@madduck.net

```

## Junio C Hamano, 2007-09-24 18:43

Subject: Re: git-send-email is omitting author and date lines
Message-ID: <7vodfraoq6.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vodfraoq6.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <20070924173014.GB27816@lapse.madduck.net>

```
martin f krafft <madduck@madduck.net> writes:

> also sprach Johannes Schindelin <Johannes.Schindelin@gmx.de> [2007.09.24.1210 +0100]:
>> And that is perfectly okay, since as far as the public is
>> concerned, this is the date of the patch.
>
> If you say so. I don't find this at all convincing.

I think that is the reasoning for the current behaviour of
send-email, but it is not unreasonable to have an option to
always add in-body From: and Date: headers to send-email, with a
blessing from a recent post from Linus to the kernel mailing
list:

	http://article.gmane.org/gmane.linux.kernel/582450

Notice the part he says he appreciates Andrew's practice and
talks about message being further forwarded by somebody else.

```
