{"thread":{"id":"10727","subject":"[PATCH] contrib/hooks/post-receive-email: add a From: line to the email header","startedAt":"2007-11-08T09:48:09Z","lastAt":"2008-01-22T14:12:04Z","messageCount":5,"participants":["Gerrit Pape","Junio C Hamano","Andreas Ericsson","Benoit Sigoure"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"58848","messageId":"20071108094809.22151.qmail@97f06c2e73713e.315fe32.mid.smarden.org","threadId":"10727","inReplyTo":null,"subject":"[PATCH] contrib/hooks/post-receive-email: add a From: line to the email header","fromName":"Gerrit Pape","fromEmail":"pape@smarden.org","sentAt":"2007-11-08T09:48:09Z","receivedAt":"2007-11-08T09:48:09Z","isPatch":true,"sender":{"key":"pape@smarden.org","avatar":"https://avatars.githubusercontent.com/u/143170252?v=4"},"body":"$committer is already extracted from the latest existing rev, so add the\ncorresponding From: line to the email header.\n\nSigned-off-by: Gerrit Pape <pape@smarden.org>\n---\n contrib/hooks/post-receive-email |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email\nindex 3904c18..c73f2d5 100644\n--- a/contrib/hooks/post-receive-email\n+++ b/contrib/hooks/post-receive-email\n@@ -189,6 +189,7 @@ generate_email_header()\n \t# --- Email (all stdout will be the email)\n \t# Generate header\n \tcat <<-EOF\n+\tFrom: $committer\n \tTo: $recipients\n \tSubject: ${emailprefix}$projectdesc $refname_type, $short_refname, ${change_type}d. $describe\n \tX-Git-Refname: $refname\n-- \n1.5.3.5\n"},{"id":"58850","messageId":"7vode52hag.fsf@gitster.siamese.dyndns.org","threadId":"10727","inReplyTo":"20071108094809.22151.qmail@97f06c2e73713e.315fe32.mid.smarden.org","subject":"Re: [PATCH] contrib/hooks/post-receive-email: add a From: line to the email header","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-11-08T09:55:03Z","receivedAt":"2007-11-08T09:55:03Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Gerrit Pape <pape@smarden.org> writes:\n\n> $committer is already extracted from the latest existing rev, so add the\n> corresponding From: line to the email header.\n\nYou may fight this out with Andy if you want to, but I think I'd\nside with the existing behaviour.\n\ncommit e6dc8d60fbd2c84900a26545c5d360b0e202d95b\nAuthor: Andy Parkins <andyparkins@gmail.com>\nDate:   Fri Sep 28 15:24:26 2007 +0100\n\n    post-receive-hook: Remove the From field from the generated email header so that the pusher's name is used\n    \n    Using the name of the committer of the revision at the tip of the\n    updated ref is not sensible.  That information is available in the email\n    itself should it be wanted, and by supplying a \"From\", we were\n    effectively hiding the person who performed the push - which is useful\n    information in itself.\n    \n    Signed-off-by: Andy Parkins <andyparkins@gmail.com>\n    Signed-off-by: Junio C Hamano <gitster@pobox.com>\n\ndiff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email\nindex 1f88099..cbbd02f 100644\n--- a/contrib/hooks/post-receive-email\n+++ b/contrib/hooks/post-receive-email\n@@ -177,7 +177,6 @@ generate_email_header()\n \t# --- Email (all stdout will be the email)\n \t# Generate header\n \tcat <<-EOF\n-\tFrom: $committer\n \tTo: $recipients\n \tSubject: ${EMAILPREFIX}$projectdesc $refname_type, $short_refname, ${change_type}d. $describe\n \tX-Git-Refname: $refname\n"},{"id":"58857","messageId":"4732E657.7020202@op5.se","threadId":"10727","inReplyTo":"7vode52hag.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] contrib/hooks/post-receive-email: add a From: line to the email header","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2007-11-08T10:35:03Z","receivedAt":"2007-11-08T10:35:03Z","isPatch":true,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Junio C Hamano wrote:\n> Gerrit Pape <pape@smarden.org> writes:\n> \n>> $committer is already extracted from the latest existing rev, so add the\n>> corresponding From: line to the email header.\n> \n> You may fight this out with Andy if you want to, but I think I'd\n> side with the existing behaviour.\n> \n\nI'm with Andy here, for the reasons stated below.\n\n> commit e6dc8d60fbd2c84900a26545c5d360b0e202d95b\n> Author: Andy Parkins <andyparkins@gmail.com>\n> Date:   Fri Sep 28 15:24:26 2007 +0100\n> \n>     post-receive-hook: Remove the From field from the generated email header so that the pusher's name is used\n>     \n>     Using the name of the committer of the revision at the tip of the\n>     updated ref is not sensible.  That information is available in the email\n>     itself should it be wanted, and by supplying a \"From\", we were\n>     effectively hiding the person who performed the push - which is useful\n>     information in itself.\n>     \n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"},{"id":"58865","messageId":"20071108121157.9749.qmail@db594f724cf2e2.315fe32.mid.smarden.org","threadId":"10727","inReplyTo":"7vode52hag.fsf@gitster.siamese.dyndns.org","subject":"[PATCH] contrib/hooks/post-receive-email: remove cruft, $committer is not used","fromName":"Gerrit Pape","fromEmail":"pape@smarden.org","sentAt":"2007-11-08T12:11:57Z","receivedAt":"2007-11-08T12:11:57Z","isPatch":true,"sender":{"key":"pape@smarden.org","avatar":"https://avatars.githubusercontent.com/u/143170252?v=4"},"body":"Signed-off-by: Gerrit Pape <pape@smarden.org>\n---\n contrib/hooks/post-receive-email |    4 ----\n 1 files changed, 0 insertions(+), 4 deletions(-)\n\ndiff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email\nindex 3904c18..7511ea0 100644\n--- a/contrib/hooks/post-receive-email\n+++ b/contrib/hooks/post-receive-email\n@@ -156,10 +156,6 @@ generate_email()\n \tfi\n \n \t# Email parameters\n-\t# The committer will be obtained from the latest existing rev; so\n-\t# for a deletion it will be the oldrev, for the others, then newrev\n-\tcommitter=$(git show --pretty=full -s $rev | sed -ne \"s/^Commit: //p\" |\n-\t\tsed -ne 's/\\(.*\\) </\"\\1\" </p')\n \t# The email subject will contain the best description of the ref\n \t# that we can build from the parameters\n \tdescribe=$(git describe $rev 2>/dev/null)\n-- \n1.5.3.5\n"},{"id":"66309","messageId":"CA518F22-C0E4-4C2E-A86C-6E8CB1776FAE@lrde.epita.fr","threadId":"10727","inReplyTo":"7vode52hag.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] contrib/hooks/post-receive-email: add a From: line to the email header","fromName":"Benoit Sigoure","fromEmail":"tsuna@lrde.epita.fr","sentAt":"2008-01-22T14:12:04Z","receivedAt":"2008-01-22T14:12:04Z","isPatch":true,"sender":{"key":"tsunanet@gmail.com","avatar":"https://avatars.githubusercontent.com/u/128281?v=4"},"body":"On Nov 8, 2007, at 10:55 AM, Junio C Hamano wrote:\n\n> Gerrit Pape <pape@smarden.org> writes:\n>\n>> $committer is already extracted from the latest existing rev, so  \n>> add the\n>> corresponding From: line to the email header.\n>\n> You may fight this out with Andy if you want to, but I think I'd\n> side with the existing behaviour.\n>\n> commit e6dc8d60fbd2c84900a26545c5d360b0e202d95b\n> Author: Andy Parkins <andyparkins@gmail.com>\n> Date:   Fri Sep 28 15:24:26 2007 +0100\n>\n>     post-receive-hook: Remove the From field from the generated  \n> email header so that the pusher's name is used\n>\n>     Using the name of the committer of the revision at the tip of the\n>     updated ref is not sensible.  That information is available in  \n> the email\n>     itself should it be wanted, and by supplying a \"From\", we were\n>     effectively hiding the person who performed the push - which is  \n> useful\n>     information in itself.\n>\n>     Signed-off-by: Andy Parkins <andyparkins@gmail.com>\n>     Signed-off-by: Junio C Hamano <gitster@pobox.com>\n\n\nHi guys,\nthe problem with this change is that when one uses Gitosis all the  \ncommits are pushed with the `git' user so emails always appear to  \ncome from git@fqdn.  I guess it would be worth to add an option to  \nretain the old behavior (where $committer was extracted from the last  \ncommit pushed and used in the `From' field), don't you think?\n\n-- \nBenoit Sigoure aka Tsuna\nEPITA Research and Development Laboratory\n"}]}