@@ -61,49 +61,32 @@ cat << 'EOF' > patch2
6161EOF
6262
6363cat << 'EOF ' > expected
64- diff -u file file
64+ ================================================================================
65+ * DELTA DIFFERENCES - code changes that differ between the patches *
66+ ================================================================================
67+
6568--- file
6669+++ file
67- @@ -2 +2,7 @@
68- -line 5
69- +D
70- +Z
71- +1
72- +1
73- +F
74- +E
75- +if
76- @@ -3,8 +9,9 @@
77- +line 6
78- if
79- 1
80- fi
81- if
82- 2
83- fi
84- -A
85- B
86- +C
87- @@ -5,9 +5,6 @@ INTERDIFF: rejected hunk from patch2, cannot diff context
88- line 5
70+ @@ -6,8 +6,8 @@
8971 if
9072 1
91- -fi
92- -if
93- -2
9473 fi
74+ +if
75+ +2
76+ +fi
9577 A
9678 B
97- @@ -7,7 +7,7 @@ INTERDIFF: rejected hunk from patch2, cannot diff context
98- C
99- 9
100- 8
101- -1
102- +7
103- D
104- E
105- if
106- @@ -50,9 +50,6 @@ INTERDIFF: rejected hunk from patch1, cannot diff context
79+ -D
80+ -E
81+ -if
82+
83+ ################################################################################
84+ ! REJECTED PATCH2 HUNKS - could not be compared; manual review needed !
85+ ################################################################################
86+
87+ --- file
88+ +++ file
89+ @@ -50,9 +50,6 @@
10790 line 6
10891 if
10992 1
@@ -113,7 +96,7 @@ diff -u file file
11396 fi
11497 B
11598 C
116- @@ -7,7 +7,7 @@ INTERDIFF: rejected hunk from patch1, cannot diff context
99+ @@ -7,7 +7,7 @@
117100 D
118101 Z
119102 1
@@ -122,6 +105,20 @@ diff -u file file
122105 F
123106 E
124107 if
108+
109+ ================================================================================
110+ * CONTEXT DIFFERENCES - surrounding code differences between the patches *
111+ ================================================================================
112+
113+ --- file
114+ +++ file
115+ @@ -2 +2,0 @@
116+ -line 5
117+ @@ -8,3 +15,2 @@
118+ fi
119+ -A
120+ B
121+
125122EOF
126123
127124${INTERDIFF} --fuzzy=1 patch1 patch2 2> errors > output
0 commit comments