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>
		
			
				
	
	
		
			38 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			38 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
<BOLD>diff --git a/pre b/post<RESET>
 | 
						|
<BOLD>index b6a9051..7803aee 100644<RESET>
 | 
						|
<BOLD>--- a/pre<RESET>
 | 
						|
<BOLD>+++ b/post<RESET>
 | 
						|
<CYAN>@@ -1,32 +1,32 @@<RESET>
 | 
						|
/ {<RESET>
 | 
						|
	<RED>this_handle<RESET><GREEN>HANDLE_2<RESET>: <RED>node<RESET><GREEN>new-node<RESET>@<RED>f00<RESET><GREEN>eeda<RESET> {
 | 
						|
		compatible = "<RED>mydev<RESET><GREEN>vendor,compat<RESET>";
 | 
						|
		string-prop = <RED>start<RESET><GREEN>end<RESET>: "hello <RED>world!<RESET><GREEN>world?<RESET>" <RED>end<RESET><GREEN>start<RESET>: ;
 | 
						|
		<RED>#size-cells<RESET><GREEN>#address-cells<RESET> = <<RED>0+0<RESET><GREEN>0+40<RESET>>;
 | 
						|
		reg = <<RED>0xf00<RESET><GREEN>0xeeda<RESET>>;
 | 
						|
		prop = <<GREEN>(<RESET>1<GREEN>)<RESET>>;
 | 
						|
		prop = <<GREEN>(<RESET>-1e10<GREEN>)<RESET>>;
 | 
						|
		prop = <(!<RED>3<RESET><GREEN>1<RESET>)>;
 | 
						|
		prop = <(~<RED>3<RESET><GREEN>1<RESET>)>;
 | 
						|
		prop = <(<RED>3<RESET><GREEN>1<RESET>*<RED>4<RESET><GREEN>2<RESET>)>;
 | 
						|
		prop = <(<RED>3<RESET><GREEN>1<RESET>&<RED>4<RESET><GREEN>2<RESET>)>;
 | 
						|
		prop = <(<RED>3<RESET><GREEN>1<RESET>*<RED>4<RESET><GREEN>2<RESET>)>;
 | 
						|
		prop = <(<RED>3<RESET><GREEN>1<RESET>/<RED>4<RESET><GREEN>2<RESET>)>;
 | 
						|
		prop = <(<RED>3<RESET><GREEN>1<RESET>%<RED>4<RESET><GREEN>2<RESET>)>;
 | 
						|
		prop = <(<RED>3+4<RESET><GREEN>1+2<RESET>)>;
 | 
						|
		prop = <(<RED>3-4<RESET><GREEN>1-2<RESET>)>;
 | 
						|
		prop = /bits/ <RED>64<RESET><GREEN>32<RESET> <(<RED>3<RESET><GREEN>1<RESET><<<RED>4<RESET><GREEN>2<RESET>)>;
 | 
						|
		prop = <(<RED>3<RESET><GREEN>1<RESET>>><RED>4<RESET><GREEN>2<RESET>)>;
 | 
						|
		prop = <(<RED>3<RESET><GREEN>1<RESET>&<RED>4<RESET><GREEN>2<RESET>)>;
 | 
						|
		prop = <(<RED>3<RESET><GREEN>1<RESET>^<RED>4<RESET><GREEN>2<RESET>)>;
 | 
						|
		prop = <(<RED>3<RESET><GREEN>1<RESET>|<RED>4<RESET><GREEN>2<RESET>)>;
 | 
						|
		prop = <(<RED>3<RESET><GREEN>1<RESET>&&<RED>4<RESET><GREEN>2<RESET>)>;
 | 
						|
		prop = <(<RED>3<RESET><GREEN>1<RESET>||<RED>4<RESET><GREEN>2<RESET>)>;
 | 
						|
		prop = <(<RED>4?5<RESET><GREEN>1?2<RESET>:3)>;
 | 
						|
		list = <&<RED>this_handle<RESET><GREEN>HANDLE_2<RESET>>, <0 0 0 <RED>0<RESET><GREEN>1<RESET>>;
 | 
						|
	};<RESET>
 | 
						|
 | 
						|
	&<RED>phandle<RESET><GREEN>phandle2<RESET> {
 | 
						|
		<RED>pre-phandle<RESET><GREEN>prop_handle<RESET> = <&<RED>this_handle<RESET><GREEN>HANDLE_2<RESET>>;
 | 
						|
	};<RESET>
 | 
						|
};<RESET>
 |