update-hook: abort early if the project description is unset
It was annoying to always have the first email from a project be from the "Unnamed repository; edit this file to name it for gitweb project"; just because it's so easy to forget to set it. This patch checks to see if the description file is still default (or empty) and aborts if so - allowing you to fix the problem before sending out silly looking emails to every developer. Signed-off-by: Andy Parkins <andyparkins@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Andy Parkins committed
Mar 20, 2007 at 10:58 UTC
0a0d080bdc68d2bd4a1824b08123690c8065badb
1 file changed
+6
templates/hooks--update
+6
@@ -56,6 +56,12 @@ recipients=$(git-repo-config hooks.mailinglist)
56
announcerecipients=$(git-repo-config hooks.announcelist)
57
allowunannotated=$(git-repo-config --bool hooks.allowunannotated)
58
59
+# check for no description
60
+if [ -z "$projectdesc" -o "$projectdesc" = "Unnamed repository; edit this file to name it for gitweb" ]; then
61
+ echo "*** Project description file hasn't been set" >&2
62
+ exit 1
63
+fi
64
+
65
# --- Check types
66
newrev_type=$(git-cat-file -t $newrev)
67