mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-26 07:33:47 +00:00
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).
This commit is contained in:
parent
a773a78312
commit
b8a96f0556
@ -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 '-'."
|
||||
|
Loading…
Reference in New Issue
Block a user