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

default update hook broken

From
MWMatthew Wilcox <matthew@wil.cx>
Date
Nov 21, 2005, 14:09 UTC
Message-ID
<20051121140914.GB1598@parisc-linux.org>

There's two syntax errors and one good-netizen error in the hooks/update file created when cloning Linus' linux-2.6.git repo. I don't know if that file is created fresh or if it gets pulled from Linus' tree. Here's a patch to fix it

--- .git/hooks/update 2005-11-21 06:31:51.000000000 -0700 +++ /home/willy/replacement-update 2005-11-21 07:01:37.000000000 -0700

@@ -8,14 +8,14 @@
 # (2) make this file executable by "chmod +x update".
 #
 
-recipient="commit-list@mydomain.xz"
+recipient="commit-list@example.com"
 
 if expr "$2" : '0*$' >/dev/null
 then
 	echo "Created a new ref, with the following commits:"
 	git-rev-list --pretty "$3"
 else
-	$base=$(git-merge-base "$2" "$3")
+	base=$(git-merge-base "$2" "$3")
 	case "$base" in
 	"$2")
 		echo "New commits:"
@@ -24,8 +24,7 @@
 		echo "Rebased ref, commits from common ancestor:"
 		;;
 	esac
-fi
-git-rev-list --pretty "$3" "^$base"
+	git-rev-list --pretty "$3" "^$base"
 fi |
 mail -s "Changes to ref $1" "$recipient"
 exit 0
Next: Andreas Ericsson
Message 1 of 2 in “default update hook broken”
  1. Matthew WilcoxNov 21, 2005
  2. Andreas EricssonNov 21, 2005

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.