summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-10-24 19:04:30 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2008-10-24 19:04:30 +0200
commitfd88652f408f4678f8c8233837c1cd5f1c6595b6 (patch)
tree884a4435506ef92c15dfb23a80628f84187bf6a2 /etc
parentddb88acf45fca2aad858c594c8639517789a06ee (diff)
git-hook: Changed directory order for less interference
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 {