All of lore.kernel.org
 help / color / mirror / Atom feed
* mkpatch and diff
@ 2005-05-19  6:24 Jean Delvare
  2005-05-19  6:24 ` Jean Delvare
  2005-05-19  6:24 ` Troy Henderson
  0 siblings, 2 replies; 3+ messages in thread
From: Jean Delvare @ 2005-05-19  6:24 UTC (permalink / raw)
  To: lm-sensors


Hi all,

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). 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. But since one can always regenerate the patch
for its own tree, I don't really see the interest. And I'm not even sure
it really helps. Less contexts also means more risks to patch in the
wrong place.

So I plan to simply remove that option. Any objection anyone?

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* mkpatch and diff
  2005-05-19  6:24 mkpatch and diff Jean Delvare
@ 2005-05-19  6:24 ` Jean Delvare
  2005-05-19  6:24 ` Troy Henderson
  1 sibling, 0 replies; 3+ messages in thread
From: Jean Delvare @ 2005-05-19  6:24 UTC (permalink / raw)
  To: lm-sensors

(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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* mkpatch and diff
  2005-05-19  6:24 mkpatch and diff Jean Delvare
  2005-05-19  6:24 ` Jean Delvare
@ 2005-05-19  6:24 ` Troy Henderson
  1 sibling, 0 replies; 3+ messages in thread
From: Troy Henderson @ 2005-05-19  6:24 UTC (permalink / raw)
  To: lm-sensors

Jean,

After removing my CVS version of i2c and lm_sensors2, I redownloaded them 
and patched my kernel.  This worked perfectly.

Troy

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-05-19  6:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-19  6:24 mkpatch and diff Jean Delvare
2005-05-19  6:24 ` Jean Delvare
2005-05-19  6:24 ` Troy Henderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.