]> git.ipfire.org Git - thirdparty/linux.git/commit
.gitattributes: use 'dts' diff driver for dts files
authorStephen Boyd <swboyd@chromium.org>
Thu, 5 Dec 2019 00:50:17 +0000 (16:50 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 5 Dec 2019 03:44:11 +0000 (19:44 -0800)
commita512ae54cee18296384f45201b3118345ce0dc80
tree56e4a87696755dbd8307f05b5abd48f7ed646085
parentd5ffb71b633cd5c4b8cce633c9d6448dced4eb74
.gitattributes: use 'dts' diff driver for dts files

Git is gaining support to display the closest node to the diff in the
hunk header via the 'dts' diff driver.  Use that driver for all dts and
dtsi files so we can gain some more context on where the diff is.
Taking a recent commit in the kernel dts files you can see the
difference.

With this patch and an updated git

: diff --git a/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi b/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi
:  index 62e07e1197cc..4c38426a6969 100644
:  --- a/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi
:  +++ b/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi
:  @@ -289,5 +289,29 @@ vdd_hdmi: regulator@1 {
:                          gpio = <&gpio TEGRA194_MAIN_GPIO(A, 3) GPIO_ACTIVE_HIGH>;
:                          enable-active-high;
:                  };
:  +
:  +               vdd_3v3_pcie: regulator@2 {
:  +                       compatible = "regulator-fixed";

vs. without this patch

:  diff --git a/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi b/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi
:  index 62e07e1197cc..4c38426a6969 100644
:  --- a/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi
:  +++ b/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi
:  @@ -289,5 +289,29 @@
:                          gpio = <&gpio TEGRA194_MAIN_GPIO(A, 3) GPIO_ACTIVE_HIGH>;
:                          enable-active-high;
:                  };
:  +
:  +               vdd_3v3_pcie: regulator@2 {
:  +                       compatible = "regulator-fixed";

You can see that we don't know what the context node is because it isn't
shown after the '@@'.

dts is not released yet but it is staged to be in the next release[1].
One can probably build git from source and try it out.

[1] https://git.kernel.org/pub/scm/git/git.git/commit/?id=d49c2c3466d2c8cb0b3d0a43e6b406b07078fdb1

Link: http://lkml.kernel.org/r/20191004212311.141538-1-swboyd@chromium.org
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Frank Rowand <frowand.list@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
.gitattributes