File: pre-commit

package info (click to toggle)
hime 0.9.11%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 11,584 kB
  • sloc: ansic: 32,177; sh: 3,851; makefile: 1,124; cpp: 337
file content (14 lines) | stat: -rwxr-xr-x 235 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env bash

# Usage: put this under ${repo_dir}/.git/hooks/

set -euo pipefail

topleveldir="$(git rev-parse --show-toplevel)"

pushd "$topleveldir" || exit 1

echo "Applying clang-format..."
make clang-format

popd || exit 1