From: Carsten Hey Date: Sat, 10 Apr 2010 13:20:10 +0000 (+0200) Subject: Don't call pre-commit hook if tg is not installed X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=dac0be9c2b8491c609c94ca5f46ce8ffac56eea9;p=topgit.git Don't call pre-commit hook if tg is not installed Signed-off-by: Carsten Hey Closes: http://bugs.debian.org/576221 Signed-off-by: Uwe Kleine-König --- diff --git a/tg.sh b/tg.sh index 91c374a..9d08d63 100644 --- a/tg.sh +++ b/tg.sh @@ -54,6 +54,8 @@ setup_hook() else hook_call="exec $hook_call" fi + # Don't call hook if tg is not installed + hook_call="if which \"$tg\" > /dev/null; then $hook_call; fi" # Insert call into the hook { echo "#!/bin/sh"