]> git.ipfire.org Git - thirdparty/git.git/commit - userdiff.c
userdiff: add a builtin pattern for dts files
authorStephen Boyd <sboyd@kernel.org>
Mon, 19 Aug 2019 21:22:43 +0000 (14:22 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 21 Aug 2019 22:09:34 +0000 (15:09 -0700)
commit3c81760bc66376c3ac69c39475cbe3b13e97e798
tree0dd31739d1fc47df21441349a0cbdb215cf647b8
parent5fa0f5238b0cd46cfe7f6fa76c3f526ea98148d9
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>
14 files changed:
Documentation/gitattributes.txt
t/t4018-diff-funcname.sh
t/t4018/dts-labels [new file with mode: 0644]
t/t4018/dts-node-unitless [new file with mode: 0644]
t/t4018/dts-nodes [new file with mode: 0644]
t/t4018/dts-nodes-comment1 [new file with mode: 0644]
t/t4018/dts-nodes-comment2 [new file with mode: 0644]
t/t4018/dts-reference [new file with mode: 0644]
t/t4018/dts-root [new file with mode: 0644]
t/t4034-diff-words.sh
t/t4034/dts/expect [new file with mode: 0644]
t/t4034/dts/post [new file with mode: 0644]
t/t4034/dts/pre [new file with mode: 0644]
userdiff.c