summaryrefslogtreecommitdiff
path: root/script/git-hooks/pre-commit-script
blob: 015a553fb457b8dbfb2c5741b9e7846bd58e7a71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/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