1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00
samba-mirror/script/git-hooks/pre-commit-script
Ralph Boehme 5757d25932 script/git-hooks: add check-trailing-whitespace
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>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Apr 26 03:54:39 CEST 2018 on sn-devel-144
2018-04-26 03:54:38 +02:00

20 lines
324 B
Bash
Executable File

#!/bin/sh
set -eu
#
# make emacs/magit work, cf
# https://github.com/magit/magit/issues/3419
#
unset GIT_LITERAL_PATHSPECS
gitdir=$(git rev-parse --show-toplevel)
if [ $? -ne 0 ] ; then
echo "git rev-parse --show-toplevel failed"
exit 1
fi
${gitdir}/script/git-hooks/check-trailing-whitespace || exit $?
exit 0