summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-10-24 19:06:53 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2008-10-24 19:06:53 +0200
commit9fda02e0e9e2187c101f2d8c1120336abc43f7d5 (patch)
tree0e7dfe295a41eb5c2360a84dbb055b830561c613 /etc
parentfd88652f408f4678f8c8233837c1cd5f1c6595b6 (diff)
git-hook: Default to list
Diffstat (limited to 'etc')
-rw-r--r--etc/functions/git-hook6
1 files changed, 1 insertions, 5 deletions
diff --git a/etc/functions/git-hook b/etc/functions/git-hook
index f20c988..bb44e05 100644
--- a/etc/functions/git-hook
+++ b/etc/functions/git-hook
@@ -3,7 +3,7 @@
## Written 2008 by Daniel Friesel <derf@derf.homelinux.org>
autoload fdie
-typeset hook_dir action=$1 hook=$2
+typeset hook_dir action=${1=list} hook=$2
if [[ -n $GIT_DIR && -d $GIT_DIR ]] {
hook_dir=$GIT_DIR/hooks
@@ -23,10 +23,6 @@ function usage {
ENDOFHELP
}
-if [[ $#* < 1 ]] {
- usage; return
-}
-
function hook_enable {
if [[ -e $hook_dir/$hook ]] {
if ! [[ -x $hook_dir/$hook ]] {