chibi-scheme/.githooks/update
2020-07-28 15:59:24 +09:00

10 lines
259 B
Bash
Executable file

#!/bin/sh
old="$2"
new="$3"
# fail if we add any new lines to C or Scheme source containing a tab
git diff --name-only "$old" "$new" |\
egrep '\.(cpp|h|scm|sld|stub)$' |\
xargs -d'\n' git diff -U0 "$old" "$new" -- |\
grep -q $'^+.*\t' && exit 1