Add git hooks to call in-project git hooks as well
This commit is contained in:
parent
b535c134a5
commit
36a376a323
12 changed files with 85 additions and 0 deletions
8
githooks/applypatch-msg
Executable file
8
githooks/applypatch-msg
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
hook=$(basename $0)
|
||||
if [ -f $GIT_DIR/hooks/$hook ]
|
||||
then
|
||||
echo Running project-level hook: $GIT_DIR/hooks/$hook
|
||||
$GIT_DIR/hooks/$hook
|
||||
fi
|
||||
|
7
githooks/commit-msg
Executable file
7
githooks/commit-msg
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
hook=$(basename $0)
|
||||
if [ -f $GIT_DIR/hooks/$hook ]
|
||||
then
|
||||
echo Running project-level hook: $GIT_DIR/hooks/$hook
|
||||
$GIT_DIR/hooks/$hook
|
||||
fi
|
7
githooks/fsmonitor-watchman
Executable file
7
githooks/fsmonitor-watchman
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
hook=$(basename $0)
|
||||
if [ -f $GIT_DIR/hooks/$hook ]
|
||||
then
|
||||
echo Running project-level hook: $GIT_DIR/hooks/$hook
|
||||
$GIT_DIR/hooks/$hook
|
||||
fi
|
7
githooks/post-checkout
Executable file
7
githooks/post-checkout
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
hook=$(basename $0)
|
||||
if [ -f $GIT_DIR/hooks/$hook ]
|
||||
then
|
||||
echo Running project-level hook: $GIT_DIR/hooks/$hook
|
||||
$GIT_DIR/hooks/$hook
|
||||
fi
|
7
githooks/post-update
Executable file
7
githooks/post-update
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
hook=$(basename $0)
|
||||
if [ -f $GIT_DIR/hooks/$hook ]
|
||||
then
|
||||
echo Running project-level hook: $GIT_DIR/hooks/$hook
|
||||
$GIT_DIR/hooks/$hook
|
||||
fi
|
7
githooks/pre-applypatch
Executable file
7
githooks/pre-applypatch
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
hook=$(basename $0)
|
||||
if [ -f $GIT_DIR/hooks/$hook ]
|
||||
then
|
||||
echo Running project-level hook: $GIT_DIR/hooks/$hook
|
||||
$GIT_DIR/hooks/$hook
|
||||
fi
|
|
@ -51,3 +51,10 @@ if [ -z "$error" ]
|
|||
then exit 0
|
||||
else exit 1
|
||||
fi
|
||||
|
||||
hook=$(basename $0)
|
||||
if [ -f $GIT_DIR/hooks/$hook ]
|
||||
then
|
||||
echo Running project-level hook: $GIT_DIR/hooks/$hook
|
||||
$GIT_DIR/hooks/$hook
|
||||
fi
|
||||
|
|
7
githooks/pre-push
Executable file
7
githooks/pre-push
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
hook=$(basename $0)
|
||||
if [ -f $GIT_DIR/hooks/$hook ]
|
||||
then
|
||||
echo Running project-level hook: $GIT_DIR/hooks/$hook
|
||||
$GIT_DIR/hooks/$hook
|
||||
fi
|
7
githooks/pre-rebase
Executable file
7
githooks/pre-rebase
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
hook=$(basename $0)
|
||||
if [ -f $GIT_DIR/hooks/$hook ]
|
||||
then
|
||||
echo Running project-level hook: $GIT_DIR/hooks/$hook
|
||||
$GIT_DIR/hooks/$hook
|
||||
fi
|
7
githooks/pre-receive
Executable file
7
githooks/pre-receive
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
hook=$(basename $0)
|
||||
if [ -f $GIT_DIR/hooks/$hook ]
|
||||
then
|
||||
echo Running project-level hook: $GIT_DIR/hooks/$hook
|
||||
$GIT_DIR/hooks/$hook
|
||||
fi
|
7
githooks/prepare-commit-msg
Executable file
7
githooks/prepare-commit-msg
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
hook=$(basename $0)
|
||||
if [ -f $GIT_DIR/hooks/$hook ]
|
||||
then
|
||||
echo Running project-level hook: $GIT_DIR/hooks/$hook
|
||||
$GIT_DIR/hooks/$hook
|
||||
fi
|
7
githooks/update
Executable file
7
githooks/update
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
hook=$(basename $0)
|
||||
if [ -f $GIT_DIR/hooks/$hook ]
|
||||
then
|
||||
echo Running project-level hook: $GIT_DIR/hooks/$hook
|
||||
$GIT_DIR/hooks/$hook
|
||||
fi
|
Loading…
Reference in a new issue