summaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2022-02-23 11:29:56 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2022-02-23 11:41:02 -0800
commitb8a96f055624f86fe965a0d1b7b2495b2db80e63 (patch)
treec959ffaa581b65a97e61cd9698bb33bb477fe2b0 /build-aux
parenta773a7831226c146edd40dbaf97f3cfad995f8ee (diff)
downloademacs-b8a96f055624f86fe965a0d1b7b2495b2db80e63.tar.gz
Port pre-commit hook to Git 2.35.0
* build-aux/git-hooks/pre-commit: Use LC_ALL=C grep -E instead of sane_egrep (removed in Git 2.35.0).
Diffstat (limited to 'build-aux')
-rwxr-xr-xbuild-aux/git-hooks/pre-commit4
1 files changed, 3 insertions, 1 deletions
diff --git a/build-aux/git-hooks/pre-commit b/build-aux/git-hooks/pre-commit
index a55004680fa..49bf05f2d9f 100755
--- a/build-aux/git-hooks/pre-commit
+++ b/build-aux/git-hooks/pre-commit
@@ -45,7 +45,9 @@ git_diff='git diff --cached --name-only --diff-filter=A'
# 'git diff' will backslash escape tabs and newlines, so we don't have
# to worry about word splitting here.
-$git_diff $head | sane_egrep 'ChangeLog|^-|/-|[^-+./_0-9A-Z_a-z]' | while IFS= read -r new_name; do
+$git_diff $head |
+LC_ALL=C grep -E 'ChangeLog|^-|/-|[^-+./_0-9A-Z_a-z]' |
+while IFS= read -r new_name; do
case $new_name in
-* | */-*)
echo "$new_name: File name component begins with '-'."