File: pre-commit-script

package info (click to toggle)
samba 2%3A4.22.4%2Bdfsg-1~deb13u1~bpo12%2B1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-backports
  • size: 185,252 kB
  • sloc: ansic: 1,955,620; python: 269,811; sh: 71,678; xml: 50,288; perl: 36,082; makefile: 6,086; yacc: 4,497; exp: 1,582; cpp: 1,224; lex: 989; awk: 589; java: 119; csh: 58; pascal: 54; sed: 45; asm: 30
file content (19 lines) | stat: -rwxr-xr-x 317 bytes parent folder | download | duplicates (4)
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