Fix hooks/update template.
Make the example address RFC2606 (aka BCP0032) compliant. Also fix a couple of shell script errors. Noted and fixed by Matthew Wilcox and Andreas Ericsson. Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano committed
Nov 21, 2005 at 10:59 UTC
60abce3c0f41952de7dc1a4abefcb988898b71a4
1 file changed
+3
-4
templates/hooks--update
+3
-4
@@ -8,14 +8,14 @@
8
# (2) make this file executable by "chmod +x update".
9
#
10
11
-recipient="commit-list@mydomain.xz"
11
+recipient="commit-list@example.com"
12
13
if expr "$2" : '0*$' >/dev/null
14
then
15
echo "Created a new ref, with the following commits:"
16
git-rev-list --pretty "$3"
17
else
18
- $base=$(git-merge-base "$2" "$3")
18
+ base=$(git-merge-base "$2" "$3")
19
case "$base" in
20
"$2")
21
echo "New commits:"
@@ -24,8 +24,7 @@ else
24
echo "Rebased ref, commits from common ancestor:"
25
;;
26
esac
27
-fi
28
-git-rev-list --pretty "$3" "^$base"
27
+ git-rev-list --pretty "$3" "^$base"
28
fi |
29
mail -s "Changes to ref $1" "$recipient"
30
exit 0