git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 1/4] update-hook: abort early if the project description is unset
@ 2007-03-20 10:58 Andy Parkins
  0 siblings, 0 replies; only message in thread
From: Andy Parkins @ 2007-03-20 10:58 UTC (permalink / raw
  To: git

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>
---
 templates/hooks--update |    6 ++++++
 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
+fi
+
 # --- Check types
 newrev_type=$(git-cat-file -t $newrev)
 
-- 
1.5.0.3.402.g0c48

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2007-03-20 10:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-20 10:58 [PATCH 1/4] update-hook: abort early if the project description is unset Andy Parkins

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).