summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rw-r--r--etc/completions/_git-hook4
-rw-r--r--etc/functions/git-hook4
2 files changed, 4 insertions, 4 deletions
diff --git a/etc/completions/_git-hook b/etc/completions/_git-hook
index b57c7a1..92b4d17 100644
--- a/etc/completions/_git-hook
+++ b/etc/completions/_git-hook
@@ -4,10 +4,10 @@ typeset hook_dir expl
if [[ -n $GIT_DIR && -d $GIT_DIR ]] {
hook_dir=$GIT_DIR/hooks
-} elif [[ -d hooks ]] {
- hook_dir=$PWD/hooks
} elif [[ -d .git/hooks ]] {
hook_dir=$PWD/.git/hooks
+} elif [[ -d hooks ]] {
+ hook_dir=$PWD/hooks
} elif [[ $PWD == */hooks ]] {
hook_dir=$PWD
}
diff --git a/etc/functions/git-hook b/etc/functions/git-hook
index fb12c4d..f20c988 100644
--- a/etc/functions/git-hook
+++ b/etc/functions/git-hook
@@ -7,10 +7,10 @@ typeset hook_dir action=$1 hook=$2
if [[ -n $GIT_DIR && -d $GIT_DIR ]] {
hook_dir=$GIT_DIR/hooks
-} elif [[ -d hooks ]] {
- hook_dir=$PWD/hooks
} elif [[ -d .git/hooks ]] {
hook_dir=$PWD/.git/hooks
+} elif [[ -d hooks ]] {
+ hook_dir=$PWD/hooks
} elif [[ $PWD == */hooks ]] {
hook_dir=$PWD
} else {