File: pre-commit-hook

package info (click to toggle)
samba 2%3A4.22.6%2Bdfsg-0%2Bdeb13u1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 185,296 kB
  • sloc: ansic: 1,956,172; python: 269,906; sh: 71,712; xml: 50,333; perl: 36,085; makefile: 6,086; yacc: 4,493; exp: 1,582; cpp: 1,224; lex: 989; awk: 589; java: 119; csh: 58; pascal: 54; sed: 45; asm: 30
file content (17 lines) | stat: -rwxr-xr-x 278 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/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