{"thread":{"id":"7328","subject":"[PATCH 1/4] update-hook: abort early if the project description is unset","startedAt":"2007-03-20T10:58:32Z","lastAt":"2007-03-20T10:58:32Z","messageCount":1,"participants":["Andy Parkins"],"isPatch":true,"patchVersion":1,"patchTotal":4},"messages":[{"id":"37613","messageId":"200703201058.33046.andyparkins@gmail.com","threadId":"7328","inReplyTo":null,"subject":"[PATCH 1/4] update-hook: abort early if the project description is unset","fromName":"Andy Parkins","fromEmail":"andyparkins@gmail.com","sentAt":"2007-03-20T10:58:32Z","receivedAt":"2007-03-20T10:58:32Z","isPatch":true,"sender":{"key":"andyparkins@gmail.com","avatar":null},"body":"It was annoying to always have the first email from a project be from\nthe \"Unnamed repository; edit this file to name it for gitweb project\";\njust because it's so easy to forget to set it.\n\nThis patch checks to see if the description file is still default (or\nempty) and aborts if so - allowing you to fix the problem before sending\nout silly looking emails to every developer.\n\nSigned-off-by: Andy Parkins <andyparkins@gmail.com>\n---\n templates/hooks--update |    6 ++++++\n 1 files changed, 6 insertions(+), 0 deletions(-)\n\ndiff --git a/templates/hooks--update b/templates/hooks--update\nindex 8f6c4fe..1a60773 100644\n--- a/templates/hooks--update\n+++ b/templates/hooks--update\n@@ -56,6 +56,12 @@ recipients=$(git-repo-config hooks.mailinglist)\n announcerecipients=$(git-repo-config hooks.announcelist)\n allowunannotated=$(git-repo-config --bool hooks.allowunannotated)\n \n+# check for no description\n+if [ -z \"$projectdesc\" -o \"$projectdesc\" = \"Unnamed repository; edit this file to name it for gitweb\" ]; then\n+\techo \"*** Project description file hasn't been set\" >&2\n+\texit 1\n+fi\n+\n # --- Check types\n newrev_type=$(git-cat-file -t $newrev)\n \n-- \n1.5.0.3.402.g0c48\n"}]}