Skip to content

Commit d49c2c3

Browse files
committed
Merge branch 'sb/userdiff-dts'
Device-tree files learned their own userdiff patterns. * sb/userdiff-dts: userdiff: add a builtin pattern for dts files
2 parents 2743b61 + 3c81760 commit d49c2c3

File tree

14 files changed

+168
-0
lines changed

14 files changed

+168
-0
lines changed

Documentation/gitattributes.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,8 @@ patterns are available:
810810

811811
- `css` suitable for cascading style sheets.
812812

813+
- `dts` suitable for devicetree (DTS) files.
814+
813815
- `fortran` suitable for source code in the Fortran language.
814816

815817
- `fountain` suitable for Fountain documents.

t/t4018-diff-funcname.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ diffpatterns="
3131
cpp
3232
csharp
3333
css
34+
dts
3435
fortran
3536
fountain
3637
golang

t/t4018/dts-labels

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/ {
2+
label_1: node1@ff00 {
3+
label2: RIGHT {
4+
vendor,some-property;
5+
6+
ChangeMe = <0x45-30>;
7+
};
8+
};
9+
};

t/t4018/dts-node-unitless

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/ {
2+
label_1: node1 {
3+
RIGHT {
4+
prop-array = <1>, <4>;
5+
ChangeMe = <0xffeedd00>;
6+
};
7+
};
8+
};

t/t4018/dts-nodes

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/ {
2+
label_1: node1@ff00 {
3+
RIGHT@deadf00,4000 {
4+
#size-cells = <1>;
5+
ChangeMe = <0xffeedd00>;
6+
};
7+
};
8+
};

t/t4018/dts-nodes-comment1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/ {
2+
label_1: node1@ff00 {
3+
RIGHT@deadf00,4000 /* &a comment */ {
4+
#size-cells = <1>;
5+
ChangeMe = <0xffeedd00>;
6+
};
7+
};
8+
};

t/t4018/dts-nodes-comment2

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/ {
2+
label_1: node1@ff00 {
3+
RIGHT@deadf00,4000 { /* a trailing comment */
4+
#size-cells = <1>;
5+
ChangeMe = <0xffeedd00>;
6+
};
7+
};
8+
};

t/t4018/dts-reference

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
&label_1 {
2+
TEST = <455>;
3+
};
4+
5+
&RIGHT {
6+
vendor,some-property;
7+
8+
ChangeMe = <0x45-30>;
9+
};

t/t4018/dts-root

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/RIGHT { /* Technically just supposed to be a slash */
2+
#size-cells = <1>;
3+
4+
ChangeMe = <0xffeedd00>;
5+
};

t/t4034-diff-words.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ test_language_driver bibtex
303303
test_language_driver cpp
304304
test_language_driver csharp
305305
test_language_driver css
306+
test_language_driver dts
306307
test_language_driver fortran
307308
test_language_driver html
308309
test_language_driver java

0 commit comments

Comments
 (0)