git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: martin f krafft <madduck@debian.org>
Cc: 428413@bugs.debian.org, Andy Parkins <andyparkins@gmail.com>,
	git@vger.kernel.org
Subject: Bug#428413: commit mail sender messes up order of arguments
Date: Sat, 15 May 2010 20:26:15 -0500	[thread overview]
Message-ID: <20100516012615.GA5599@progeny.tock> (raw)
In-Reply-To: <20070611150405.GA4211@lapse.madduck.net>

tags 428413 - wontfix
reassign 428413 git git-core/1:1.5.2.1-1
found 428413 git/1:1.7.1-1
quit

martin f krafft wrote:

> According to the default hooks/post-receive file, the hook is called
> with three arguments on stdin:
> 
>   <oldrev> <newrev> <refname>
> 
> This leads people to assume that in command-line mode, the order
> should be the same. But it's not, because the email hook instead
> calls:
> 
>   generate_email $2 $3 $1
> 
> this is at least misleading and not documented anywhere.

So maybe we should document it.

I haven’t checked that the below is actually true; I just took the
commit message to v1.5.1~9 and paraphrased it.  Thoughts?

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
 contrib/hooks/post-receive-email |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email
index 58a35c8..30ae63d 100755
--- a/contrib/hooks/post-receive-email
+++ b/contrib/hooks/post-receive-email
@@ -23,6 +23,13 @@
 # possible for the email to be from someone other than the person doing the
 # push.
 #
+# To help with debugging and use on pre-v1.5.1 git servers, this script will
+# also obey the interface of hooks/update, taking its arguments on the
+# command line.  Unfortunately, hooks/update is called once for each ref.
+# To avoid firing one email per ref, this script just prints its output to
+# the screen when used in this mode.  The output can then be redirected if
+# wanted.
+#
 # Config
 # ------
 # hooks.mailinglist
-- 
1.7.1




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

           reply	other threads:[~2010-05-16  1:27 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20070611150405.GA4211@lapse.madduck.net>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100516012615.GA5599@progeny.tock \
    --to=jrnieder@gmail.com \
    --cc=428413@bugs.debian.org \
    --cc=andyparkins@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=madduck@debian.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).