Skip to contentSkip to conversation

git-send-email is omitting author and date lines

DISCUSSION Hanspeter Kunz 4 participants 9 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

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.

#1 lore raw
Quoted 3 lines · Hanspeter Kunz

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?

#2 lore raw
Quoted 7 lines · Junio C Hamano
Quoted 3 lines · Hanspeter Kunz

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?

#3 lore raw

Hi,

Quoted 10 lines · Hanspeter Kunz
Quoted 7 lines · Junio C Hamano
Quoted 3 lines · Hanspeter Kunz

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

#4 lore raw
Quoted 11 lines · Johannes Schindelin

Hi,

Quoted 7 lines · Hanspeter Kunz
Quoted 6 lines · Junio C Hamano
Quoted 3 lines · Hanspeter Kunz

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.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

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.

#5 lore raw
In reply to Junio C Hamano

also sprach Junio C Hamano <[email protected]> [2007.09.24.0029 +0100]:

Quoted 1 line

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.

Signature · 8 lines
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: [email protected]
#6 lore raw

Hi,

Quoted 4 lines · martin f krafft

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

#7 lore raw

also sprach Johannes Schindelin <[email protected]> [2007.09.24.1210 +0100]:

Quoted 2 lines

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.

Signature · 8 lines
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: [email protected]
#8 lore raw
Quoted 5 lines · martin f krafft

also sprach Johannes Schindelin <[email protected]> [2007.09.24.1210 +0100]:

Quoted 2 lines

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.