path: root/templates/hooks--update
diff options
authorAndy Parkins <>2007-03-20 10:58:32 (GMT)
committerJunio C Hamano <>2007-03-22 10:02:31 (GMT)
commit0a0d080bdc68d2bd4a1824b08123690c8065badb (patch)
treef21966202d1a541dfeb5847715941e5162b07d67 /templates/hooks--update
parent85295a52e683a24d8404c6989d8b8f134a0ea684 (diff)
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 <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'templates/hooks--update')
1 files changed, 6 insertions, 0 deletions
diff --git a/templates/hooks--update b/templates/hooks--update
index 8f6c4fe..1a60773 100644
--- a/templates/hooks--update
+++ b/templates/hooks--update
@@ -56,6 +56,12 @@ recipients=$(git-repo-config hooks.mailinglist)
announcerecipients=$(git-repo-config hooks.announcelist)
allowunannotated=$(git-repo-config --bool hooks.allowunannotated)
+# check for no description
+if [ -z "$projectdesc" -o "$projectdesc" = "Unnamed repository; edit this file to name it for gitweb" ]; then
+ echo "*** Project description file hasn't been set" >&2
+ exit 1
# --- Check types
newrev_type=$(git-cat-file -t $newrev)