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

[PATCH] post-receive-email hook: handle order of arguments consistently

From
Gerrit Pape <pape@smarden.org>
Date
Jun 14, 2007, 09:09 UTC
Message-ID
<20070614090929.31616.qmail@c76df6d65db410.315fe32.mid.smarden.org>

The post-receive-email hook usually gets its arguments through stdin, but also supports them to be specified at the command line. The order of the arguments should consistently follow the documentation no matter how they are passed to the script.

This was noticed and suggested by martin f krafft through
 http://bugs.debian.org/428413
Signed-off-by: Gerrit Pape <pape@smarden.org>
---
 contrib/hooks/post-receive-email |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email
index c589a39..f84532f 100644
--- a/contrib/hooks/post-receive-email
+++ b/contrib/hooks/post-receive-email
@@ -605,7 +605,7 @@ envelopesender=$(git-repo-config hooks.envelopesender)
 if [ -n "$1" -a -n "$2" -a -n "$3" ]; then
 	# Output to the terminal in command line mode - if someone wanted to
 	# resend an email; they could redirect the output to sendmail themselves
-	PAGER= generate_email $2 $3 $1
+	PAGER= generate_email $1 $2 $3
 else
 	if [ -n "$envelopesender" ]; then
 		envelopesender="-f '$envelopesender'"
-- 
1.5.2.1
Next: Andy Parkins
Message 1 of 4 in “post-receive-email hook: handle order of arguments consistently”
  1. post-receive-email hook: handle order of arguments consistentlyGerrit Pape, Jun 14, 2007
  2. Andy ParkinsJun 14, 2007
  3. post-receive-email hook: handle order of arguments consistentlyGerrit Pape, Aug 7, 2007
  4. Andy ParkinsAug 7, 2007

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.