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

[PATCH] post-receive-email: Fix handling of hooks.emailmaxlines configuration option

From
Mike Crowe <mac@mcrowe.com>
Date
Aug 11, 2011, 17:13 UTC
Message-ID
<1313082811-1396-1-git-send-email-mac@mcrowe.com>

Make the hooks.emailmaxlines configuration option work correctly again. It looks like this was broken by 53cad691.

Signed-off-by: Mike Crowe <mac@mcrowe.com>
---
 contrib/hooks/post-receive-email |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email
index fa6d41a..ab6d298 100755
--- a/contrib/hooks/post-receive-email
+++ b/contrib/hooks/post-receive-email
@@ -85,7 +85,6 @@ prep_for_email()
 	oldrev=$(git rev-parse $1)
 	newrev=$(git rev-parse $2)
 	refname="$3"
-	maxlines=$4
 
 	# --- Interpret
 	# 0000->1234 (create)
@@ -198,6 +197,8 @@ prep_for_email()
 generate_email()
 {
 	# Email parameters
+	maxlines=$1
+
 	# The email subject will contain the best description of the ref
 	# that we can build from the parameters
 	describe=$(git describe $rev 2>/dev/null)
-- 
1.7.2.5
Message 1 of 1 in “post-receive-email: Fix handling of hooks.emailmaxlines configuration option”
  1. post-receive-email: Fix handling of hooks.emailmaxlines configuration optionMike Crowe, Aug 11, 2011

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.