git-commit-vandalism/t/t4018
Stephen Boyd 3c81760bc6 userdiff: add a builtin pattern for dts files
The Linux kernel receives many patches to the devicetree files each
release. The hunk header for those patches typically show nothing,
making it difficult to figure out what node is being modified without
applying the patch or opening the file and seeking to the context. Let's
add a builtin 'dts' pattern to git so that users can get better diff
output on dts files when they use the diff=dts driver.

The regex has been constructed based on the spec at devicetree.org[1]
and with some help from Johannes Sixt.

[1] https://github.com/devicetree-org/devicetree-specification/releases/latest

Cc: Rob Herring <robh+dt@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-08-21 15:09:34 -07:00
..
cpp-c++-function t4018: test cases for the built-in cpp pattern 2014-03-21 15:03:29 -07:00
cpp-class-constructor
cpp-class-constructor-mem-init userdiff: have 'cpp' hunk header pattern catch more C++ anchor points 2014-03-21 15:03:32 -07:00
cpp-class-definition t4018: test cases for the built-in cpp pattern 2014-03-21 15:03:29 -07:00
cpp-class-definition-derived
cpp-class-destructor userdiff: have 'cpp' hunk header pattern catch more C++ anchor points 2014-03-21 15:03:32 -07:00
cpp-function-returning-global-type
cpp-function-returning-nested userdiff: have 'cpp' hunk header pattern catch more C++ anchor points 2014-03-21 15:03:32 -07:00
cpp-function-returning-pointer
cpp-function-returning-reference userdiff: have 'cpp' hunk header pattern catch more C++ anchor points 2014-03-21 15:03:32 -07:00
cpp-gnu-style-function
cpp-namespace-definition
cpp-operator-definition
cpp-skip-access-specifiers
cpp-skip-comment-block
cpp-skip-labels
cpp-struct-definition
cpp-struct-single-line
cpp-template-function-definition userdiff: have 'cpp' hunk header pattern catch more C++ anchor points 2014-03-21 15:03:32 -07:00
cpp-union-definition userdiff: have 'cpp' hunk header pattern catch more C++ anchor points 2014-03-21 15:03:32 -07:00
cpp-void-c-function t4018: test cases for the built-in cpp pattern 2014-03-21 15:03:29 -07:00
css-brace-in-col-1
css-colon-eol userdiff: add built-in pattern for CSS 2016-06-03 14:45:56 -07:00
css-colon-selector userdiff: add built-in pattern for CSS 2016-06-03 14:45:56 -07:00
css-common
css-long-selector-list userdiff: add built-in pattern for CSS 2016-06-03 14:45:56 -07:00
css-prop-sans-indent
css-short-selector-list userdiff: add built-in pattern for CSS 2016-06-03 14:45:56 -07:00
css-trailing-space
custom1-pattern t4018: convert custom pattern test to the new infrastructure 2014-03-21 15:02:57 -07:00
custom2-match-to-end-of-line
custom3-alternation-in-pattern t4018: convert custom pattern test to the new infrastructure 2014-03-21 15:02:57 -07:00
dts-labels userdiff: add a builtin pattern for dts files 2019-08-21 15:09:34 -07:00
dts-node-unitless userdiff: add a builtin pattern for dts files 2019-08-21 15:09:34 -07:00
dts-nodes userdiff: add a builtin pattern for dts files 2019-08-21 15:09:34 -07:00
dts-nodes-comment1 userdiff: add a builtin pattern for dts files 2019-08-21 15:09:34 -07:00
dts-nodes-comment2 userdiff: add a builtin pattern for dts files 2019-08-21 15:09:34 -07:00
dts-reference userdiff: add a builtin pattern for dts files 2019-08-21 15:09:34 -07:00
dts-root userdiff: add a builtin pattern for dts files 2019-08-21 15:09:34 -07:00
fountain-scene userdiff: add support for Fountain documents 2015-07-23 14:44:51 -07:00
golang-complex-function userdiff: add built-in pattern for golang 2018-03-01 13:36:49 -08:00
golang-func
golang-interface
golang-long-func
golang-struct
java-class-member-function t4018: convert java pattern test to the new infrastructure 2014-03-21 15:02:36 -07:00
matlab-class-definition userdiff: add Octave 2019-05-19 10:45:28 +09:00
matlab-function userdiff: add Octave 2019-05-19 10:45:28 +09:00
matlab-octave-section-1
matlab-octave-section-2 userdiff: add Octave 2019-05-19 10:45:28 +09:00
matlab-section
perl-skip-end-of-heredoc t4018: convert perl pattern tests to the new infrastructure 2014-03-21 15:02:19 -07:00
perl-skip-forward-decl
perl-skip-sub-in-pod
perl-sub-definition
perl-sub-definition-kr-brace t4018: convert perl pattern tests to the new infrastructure 2014-03-21 15:02:19 -07:00
php-abstract-class userdiff: support new keywords in PHP hunk header 2018-07-06 14:59:28 -07:00
php-class
php-final-class
php-function
php-interface
php-method
php-trait
README
rust-fn userdiff: add built-in pattern for rust 2019-05-17 12:54:02 +09:00
rust-impl
rust-struct
rust-trait

How to write RIGHT test cases
=============================

Insert the word "ChangeMe" (exactly this form) at a distance of
at least two lines from the line that must appear in the hunk header.

The text that must appear in the hunk header must contain the word
"right", but in all upper-case, like in the title above.

To mark a test case that highlights a malfunction, insert the word
BROKEN in all lower-case somewhere in the file.

This text is a bit twisted and out of order, but it is itself a
test case for the default hunk header pattern. Know what you are doing
if you change it.

BTW, this tests that the head line goes to the hunk header, not the line
of equal signs.