mkpatch and diff

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(Replying to myself...)

> In the mkpatch.pl scripts, we use "diff -u2" to generate the diffs.
> Since this option is deprecated and it should be "diff -U 2", I was
> about to update this line, and wondered why this option was in use.
> 
> I tested without this option and the patch is actually *smaller* than
> when using only two lines of context (242846 bytes with the option,
> 210144 without it).

I have to correct what I said here. The size I give here is with no option at all, but this produces a non-unified diff, so this is rather useless. A unified diff with 3 lines of context is bigger (257616 bytes), as expected.

> The only reason I can see is that it might help
> using the patch on a different version of the Linux kernel than the
> one that was used as a base.

I have to correct this too. If more context exists, patch is still able to ignore the lines that would cause the operation to fail. So, size left apart, there is no benefit specifying a smaller "u" value for diff.

-- 
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/



[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux