summaryrefslogtreecommitdiff
path: root/t/t4018
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@kernel.org>2019-08-19 21:22:43 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-08-21 22:09:34 (GMT)
commit3c81760bc66376c3ac69c39475cbe3b13e97e798 (patch)
tree0dd31739d1fc47df21441349a0cbdb215cf647b8 /t/t4018
parent5fa0f5238b0cd46cfe7f6fa76c3f526ea98148d9 (diff)
downloadgit-3c81760bc66376c3ac69c39475cbe3b13e97e798.zip
git-3c81760bc66376c3ac69c39475cbe3b13e97e798.tar.gz
git-3c81760bc66376c3ac69c39475cbe3b13e97e798.tar.bz2
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>
Diffstat (limited to 't/t4018')
-rw-r--r--t/t4018/dts-labels9
-rw-r--r--t/t4018/dts-node-unitless8
-rw-r--r--t/t4018/dts-nodes8
-rw-r--r--t/t4018/dts-nodes-comment18
-rw-r--r--t/t4018/dts-nodes-comment28
-rw-r--r--t/t4018/dts-reference9
-rw-r--r--t/t4018/dts-root5
7 files changed, 55 insertions, 0 deletions
diff --git a/t/t4018/dts-labels b/t/t4018/dts-labels
new file mode 100644
index 0000000..b21ef87
--- /dev/null
+++ b/t/t4018/dts-labels
@@ -0,0 +1,9 @@
+/ {
+ label_1: node1@ff00 {
+ label2: RIGHT {
+ vendor,some-property;
+
+ ChangeMe = <0x45-30>;
+ };
+ };
+};
diff --git a/t/t4018/dts-node-unitless b/t/t4018/dts-node-unitless
new file mode 100644
index 0000000..c5287d9
--- /dev/null
+++ b/t/t4018/dts-node-unitless
@@ -0,0 +1,8 @@
+/ {
+ label_1: node1 {
+ RIGHT {
+ prop-array = <1>, <4>;
+ ChangeMe = <0xffeedd00>;
+ };
+ };
+};
diff --git a/t/t4018/dts-nodes b/t/t4018/dts-nodes
new file mode 100644
index 0000000..5a4334b
--- /dev/null
+++ b/t/t4018/dts-nodes
@@ -0,0 +1,8 @@
+/ {
+ label_1: node1@ff00 {
+ RIGHT@deadf00,4000 {
+ #size-cells = <1>;
+ ChangeMe = <0xffeedd00>;
+ };
+ };
+};
diff --git a/t/t4018/dts-nodes-comment1 b/t/t4018/dts-nodes-comment1
new file mode 100644
index 0000000..559dfce
--- /dev/null
+++ b/t/t4018/dts-nodes-comment1
@@ -0,0 +1,8 @@
+/ {
+ label_1: node1@ff00 {
+ RIGHT@deadf00,4000 /* &a comment */ {
+ #size-cells = <1>;
+ ChangeMe = <0xffeedd00>;
+ };
+ };
+};
diff --git a/t/t4018/dts-nodes-comment2 b/t/t4018/dts-nodes-comment2
new file mode 100644
index 0000000..27e9718
--- /dev/null
+++ b/t/t4018/dts-nodes-comment2
@@ -0,0 +1,8 @@
+/ {
+ label_1: node1@ff00 {
+ RIGHT@deadf00,4000 { /* a trailing comment */
+ #size-cells = <1>;
+ ChangeMe = <0xffeedd00>;
+ };
+ };
+};
diff --git a/t/t4018/dts-reference b/t/t4018/dts-reference
new file mode 100644
index 0000000..8f0c87d
--- /dev/null
+++ b/t/t4018/dts-reference
@@ -0,0 +1,9 @@
+&label_1 {
+ TEST = <455>;
+};
+
+&RIGHT {
+ vendor,some-property;
+
+ ChangeMe = <0x45-30>;
+};
diff --git a/t/t4018/dts-root b/t/t4018/dts-root
new file mode 100644
index 0000000..2ef9e6f
--- /dev/null
+++ b/t/t4018/dts-root
@@ -0,0 +1,5 @@
+/RIGHT { /* Technically just supposed to be a slash */
+ #size-cells = <1>;
+
+ ChangeMe = <0xffeedd00>;
+};