From 8daa83a594a2e98f39d764422bfbdbc62c9efd44 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 19:20:00 +0200 Subject: Adding upstream version 2:4.20.0+dfsg. Signed-off-by: Daniel Baumann --- script/git-hooks/pre-commit-script | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 script/git-hooks/pre-commit-script (limited to 'script/git-hooks/pre-commit-script') diff --git a/script/git-hooks/pre-commit-script b/script/git-hooks/pre-commit-script new file mode 100755 index 0000000..8adb01c --- /dev/null +++ b/script/git-hooks/pre-commit-script @@ -0,0 +1,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 -- cgit v1.2.3