summaryrefslogtreecommitdiff
path: root/pre-receive.sh
diff options
context:
space:
mode:
authorp4bl0 <pablo@rauzy.name>2010-08-10 22:25:11 +0200
committerp4bl0 <pablo@rauzy.name>2010-08-10 22:25:11 +0200
commitf71626c7ecade5cf26baa9cb318cdd1c3d0c84c1 (patch)
treea894c4aebf28fd8577abb647a6bd97d54a62e478 /pre-receive.sh
parentd0618efb643f2dbec9b470a129946396315f60d5 (diff)
now preventing commit when zero article (for real ^^) and push when fugitive.blog-url not set
Diffstat (limited to 'pre-receive.sh')
-rw-r--r--pre-receive.sh10
1 files changed, 10 insertions, 0 deletions
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 "<url>"` ' >&2
+ echo "on the remote repository, aborting." >&2
+ exit 1
+fi