mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
8649e21665
When developer mode is enabled, the wrapper script "script/git-hooks/pre-commit-hook" gets installed as .git/hooks/pre-commit and calls "script/git-hooks/pre-commit-script". This way we can later modify the "script/git-hooks/pre-commit-script" without the need to ever change the installed commit hook itself. Signed-off-by: Ralph Boehme <slow at samba.org> Reviewed-by: Martin Schwenke <martin at meltin.net> Reviewed-by: Jeremy Allison <jra at samba.org>
18 lines
289 B
Bash
Executable File
18 lines
289 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -eu
|
|
|
|
gitdir=$(git rev-parse --show-toplevel)
|
|
if [ $? -ne 0 ] ; then
|
|
echo "git rev-parse --show-toplevel failed"
|
|
exit 1
|
|
fi
|
|
|
|
if [ ! -f ${gitdir}/script/git-hooks/pre-commit-script ] ; then
|
|
exit 0
|
|
fi
|
|
|
|
${gitdir}/script/git-hooks/pre-commit-script || exit $?
|
|
|
|
exit 0
|