From f71626c7ecade5cf26baa9cb318cdd1c3d0c84c1 Mon Sep 17 00:00:00 2001 From: p4bl0 Date: Tue, 10 Aug 2010 22:25:11 +0200 Subject: now preventing commit when zero article (for real ^^) and push when fugitive.blog-url not set --- pre-receive.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 pre-receive.sh (limited to 'pre-receive.sh') diff --git a/pre-receive.sh b/pre-receive.sh new file mode 100644 index 0000000..63bc870 --- /dev/null +++ b/pre-receive.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +blog_url=`git config --get fugitive.blog-url` +if [ "$blog_url" = "" ]; then + echo -n "[fugitive] ERROR: git config fugitive.blog-url is empty and" >&2 + echo -n " should not be, please set it with " >&2 + echo -n '`git config fugitive.blog-url ""` ' >&2 + echo "on the remote repository, aborting." >&2 + exit 1 +fi -- cgit v1.2.3