emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-28 b8bc359bbf: Backport: Port pre-commit hook to Git 2.35.0


From: Robert Pluim
Subject: emacs-28 b8bc359bbf: Backport: Port pre-commit hook to Git 2.35.0
Date: Tue, 1 Mar 2022 04:01:42 -0500 (EST)

branch: emacs-28
commit b8bc359bbfd36b3e281bdcba154ed74ca897d850
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Robert Pluim <rpluim@gmail.com>

    Backport: 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).
    
    (cherry picked from commit b8a96f055624f86fe965a0d1b7b2495b2db80e63)
---
 build-aux/git-hooks/pre-commit | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/build-aux/git-hooks/pre-commit b/build-aux/git-hooks/pre-commit
index a55004680f..49bf05f2d9 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 '-'."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]