Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t/t4018
diff options
context:
space:
mode:
authorPhilippe Blain <levraiphilippeblain@gmail.com>2020-08-13 01:30:29 +0300
committerJunio C Hamano <gitster@pobox.com>2020-08-13 21:21:18 +0300
commit75c3b6b2e8a72239fa23e039c46f9a5cf8c24142 (patch)
tree3a0d8f50ab7083c7ef75584c8f0f7be7499e2372 /t/t4018
parentb79e6925f0ff8ae0afa6554224a5a2e1c41a4605 (diff)
userdiff: improve Fortran xfuncname regex
The third part of the Fortran xfuncname regex wants to match the beginning of a subroutine or function, so it allows for all characters except `'`, `"` or whitespace before the keyword 'function' or 'subroutine'. This is meant to match the 'recursive', 'elemental' or 'pure' keywords, as well as function return types, and to prevent matches inside strings. However, the negated set does not contain the `!` comment character, so a line with an end-of-line comment containing the keyword 'function' or 'subroutine' followed by another word is mistakenly chosen as a hunk header. Improve the regex by adding `!` to the negated set. Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4018')
-rw-r--r--t/t4018/fortran-comment-keyword1
1 files changed, 0 insertions, 1 deletions
diff --git a/t/t4018/fortran-comment-keyword b/t/t4018/fortran-comment-keyword
index c5dbdb4c61..e9206a5379 100644
--- a/t/t4018/fortran-comment-keyword
+++ b/t/t4018/fortran-comment-keyword
@@ -8,7 +8,6 @@
real funcB ! grid function b
real ChangeMe
- integer broken
end subroutine RIGHT