diff options
| author | Glenn Morris | 2018-08-29 08:24:03 -0700 |
|---|---|---|
| committer | Glenn Morris | 2018-08-29 08:24:03 -0700 |
| commit | d8bef4b519624de20baa1428dd103f61dfb220fa (patch) | |
| tree | ed458e2d88b9a0a422fd46e50c1d2654d24b07a9 /build-aux | |
| parent | b28d5333e0144acc7385339578d907196c4b6f3e (diff) | |
| parent | 2670cbf9a87eb498d73770c381ca51657d390a1e (diff) | |
| download | emacs-d8bef4b519624de20baa1428dd103f61dfb220fa.tar.gz emacs-d8bef4b519624de20baa1428dd103f61dfb220fa.zip | |
Merge from origin/emacs-26
2670cbf (origin/emacs-26) ; * configure.ac: Remove outdated comment (...
3b71bef admin.el: respect environment settings for makeinfo etc
3764ab4 * etc/PROBLEMS: New entry about GTK+ 3 crash with some X serv...
9d61344 Index profiler commands in elisp manual
f088817 Fix math-imaginary-i check
fca935e ; Let pre-commit git hook check merged in changes (Bug#29197)
fe06fcc Avoid infinite hscrolling loops when line numbers are displayed
63e59c8 Avoid crashes in malformed defvar
785682c * configure.ac (emacs_config_features): Add GLIB, XDBE, XIM.
2695b7e * configure.ac: Doc fixes related to --with-xim.
d0d162c Small checkdoc quoting fix (bug#32546)
Conflicts:
configure.ac
Diffstat (limited to 'build-aux')
| -rwxr-xr-x | build-aux/git-hooks/pre-commit | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/build-aux/git-hooks/pre-commit b/build-aux/git-hooks/pre-commit index 5e42dab233b..c0455fb2fa2 100755 --- a/build-aux/git-hooks/pre-commit +++ b/build-aux/git-hooks/pre-commit | |||
| @@ -28,7 +28,7 @@ exec >&2 | |||
| 28 | # When doing a two-way merge, ignore problems that came from the other | 28 | # When doing a two-way merge, ignore problems that came from the other |
| 29 | # side of the merge. | 29 | # side of the merge. |
| 30 | head=HEAD | 30 | head=HEAD |
| 31 | if test -r "$GIT_DIR"/MERGE_HEAD; then | 31 | if test -r "$GIT_DIR"/MERGE_HEAD && test "$GIT_MERGE_CHECK_OTHER" != true; then |
| 32 | merge_heads=`cat "$GIT_DIR"/MERGE_HEAD` || exit | 32 | merge_heads=`cat "$GIT_DIR"/MERGE_HEAD` || exit |
| 33 | for merge_head in $merge_heads; do | 33 | for merge_head in $merge_heads; do |
| 34 | case $head in | 34 | case $head in |
| @@ -42,15 +42,10 @@ if test -r "$GIT_DIR"/MERGE_HEAD; then | |||
| 42 | fi | 42 | fi |
| 43 | 43 | ||
| 44 | git_diff='git diff --cached --name-only --diff-filter=A' | 44 | git_diff='git diff --cached --name-only --diff-filter=A' |
| 45 | ok_chars='\0+[=-=]./0-9A-Z_a-z' | ||
| 46 | nbadchars=`$git_diff -z $head | tr -d "$ok_chars" | wc -c` | ||
| 47 | 45 | ||
| 48 | if test "$nbadchars" -ne 0; then | 46 | # 'git diff' will backslash escape tabs and newlines, so we don't have |
| 49 | echo "File name does not consist of -+./_ or ASCII letters or digits." | 47 | # to worry about word splitting here. |
| 50 | exit 1 | 48 | $git_diff $head | sane_egrep 'ChangeLog|^-|/-|[^-+./_0-9A-Z_a-z]' | while IFS= read -r new_name; do |
| 51 | fi | ||
| 52 | |||
| 53 | for new_name in `$git_diff $head`; do | ||
| 54 | case $new_name in | 49 | case $new_name in |
| 55 | -* | */-*) | 50 | -* | */-*) |
| 56 | echo "$new_name: File name component begins with '-'." | 51 | echo "$new_name: File name component begins with '-'." |
| @@ -58,6 +53,9 @@ for new_name in `$git_diff $head`; do | |||
| 58 | ChangeLog | */ChangeLog) | 53 | ChangeLog | */ChangeLog) |
| 59 | echo "$new_name: Please use git commit messages, not ChangeLog files." | 54 | echo "$new_name: Please use git commit messages, not ChangeLog files." |
| 60 | exit 1;; | 55 | exit 1;; |
| 56 | *) | ||
| 57 | echo "$new_name: File name does not consist of -+./_ or ASCII letters or digits." | ||
| 58 | exit 1;; | ||
| 61 | esac | 59 | esac |
| 62 | done | 60 | done |
| 63 | 61 | ||