git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] contrib/hooks/post-receive-email: add a From: line to the email header

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 8, 2007, 09:55 UTC
Message-ID
<7vode52hag.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20071108094809.22151.qmail@97f06c2e73713e.315fe32.mid.smarden.org>
Gerrit Pape <pape@smarden.org> writes:
> $committer is already extracted from the latest existing rev, so add the
> corresponding From: line to the email header.

You may fight this out with Andy if you want to, but I think I'd side with the existing behaviour.

commit e6dc8d60fbd2c84900a26545c5d360b0e202d95b
Author: Andy Parkins <andyparkins@gmail.com>
Date:   Fri Sep 28 15:24:26 2007 +0100
    post-receive-hook: Remove the From field from the generated email header so that the pusher's name is used
    
    Using the name of the committer of the revision at the tip of the
    updated ref is not sensible.  That information is available in the email
    itself should it be wanted, and by supplying a "From", we were
    effectively hiding the person who performed the push - which is useful
    information in itself.
    
    Signed-off-by: Andy Parkins <andyparkins@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email
index 1f88099..cbbd02f 100644
--- a/contrib/hooks/post-receive-email
+++ b/contrib/hooks/post-receive-email
@@ -177,7 +177,6 @@ generate_email_header()
 	# --- Email (all stdout will be the email)
 	# Generate header
 	cat <<-EOF
-	From: $committer
 	To: $recipients
 	Subject: ${EMAILPREFIX}$projectdesc $refname_type, $short_refname, ${change_type}d. $describe
 	X-Git-Refname: $refname
Previous: Gerrit PapeNext: Andreas Ericsson
Message 2 of 5 in “contrib/hooks/post-receive-email: add a From: line to the email header”
  1. contrib/hooks/post-receive-email: add a From: line to the email headerGerrit Pape, Nov 8, 2007
  2. Junio C HamanoNov 8, 2007
  3. Andreas EricssonNov 8, 2007
  4. contrib/hooks/post-receive-email: remove cruft, $committer is not usedGerrit Pape, Nov 8, 2007
  5. Benoit SigoureJan 22, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.