@@ -33,6 +33,7 @@ pub fn main() !void {
33
33
switch (state ) {
34
34
.copy = > {
35
35
const line = getLine (allocator , file ) orelse return ;
36
+ std .debug .print ("copy '{s}' ({d})\n " , .{ line , line .len });
36
37
_ = try output .write (line );
37
38
_ = try output .write ("\n " );
38
39
},
@@ -41,15 +42,18 @@ pub fn main() !void {
41
42
switch (chunk .action ) {
42
43
.remove = > {
43
44
const line = getLine (allocator , file ) orelse return ;
45
+ std .debug .print ("remove '{s}' ({d}) '{s}' ({d})\n " , .{ line , line .len , chunk .buf , chunk .buf .len });
44
46
if (! std .mem .eql (u8 , chunk .buf , line )) @panic ("Failed to apply patch" );
45
47
},
46
48
.keep = > {
47
49
const line = getLine (allocator , file ) orelse return ;
50
+ std .debug .print ("keep '{s}' ({d}) '{s}' ({d})\n " , .{ line , line .len , chunk .buf , chunk .buf .len });
48
51
if (! std .mem .eql (u8 , chunk .buf , line )) @panic ("Failed to apply patch" );
49
52
_ = try output .write (line );
50
53
_ = try output .write ("\n " );
51
54
},
52
55
.add = > {
56
+ std .debug .print ("add '{s}' ({d})\n " , .{ chunk .buf , chunk .buf .len });
53
57
_ = try output .write (chunk .buf );
54
58
_ = try output .write ("\n " );
55
59
},
0 commit comments