mirror of https://github.com/nmlgc/ReC98.git
[Hooks] pre-commit: Preserve CRLF line endings
Part of P0239, funded by Ember2528.
This commit is contained in:
parent
c5e51e6cb2
commit
ea8c4b85a4
|
@ -11,7 +11,7 @@ fi
|
||||||
# Remove trailing commas from `public` directives. These crash on TASM32
|
# Remove trailing commas from `public` directives. These crash on TASM32
|
||||||
# version 5.0, but work on later versions.
|
# version 5.0, but work on later versions.
|
||||||
for f in `git diff-index --name-only --cached --diff-filter=ACMRX ${against} | grep \.asm$ -i`; do
|
for f in `git diff-index --name-only --cached --diff-filter=ACMRX ${against} | grep \.asm$ -i`; do
|
||||||
if [ -n "$(sed -i -E 's/(public\s+[^;]+?),\s*(;.*)?$/\1\2/w /dev/stdout' "$f")" ]; then
|
if [ -n "$(sed -b -i -E 's/(public\s+[^;]+?),\s*(;.*)?$/\1\2/w /dev/stdout' "$f")" ]; then
|
||||||
echo "$f"': removed a trailing comma from a `public` line, please re-stage.'
|
echo "$f"': removed a trailing comma from a `public` line, please re-stage.'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue