[lkml]   [2001]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: question on generating a patch

[David L. Parsley]
> I read the FAQ and SubmittingPatches, but how best to generate a
> patch that moves a file from on dir to another? diff -urNP makes the
> patch a lot longer than it seems like it should be...

A major weakness of the 'patch' command -- you cannot gracefully move
or rename files. Larry Wall saw this years ago and invented a hybrid
sort of patch that runs as a shar-like shell script, moving things
around before actually applying itself as a patch. But most people,
including linux-kernel, don't use lwall's patch+shar format.

- If it's a fairly small file anyway, just use 'diff -urN' and don't
worry about it.

- If it's a large file or several files, or if you are making
significant changes to said files besides moving them, you should
probably list two separate steps: first, describe the rearrangement,
perhaps as a series of 'mv' commands; second, give us a patch against
the new arrangement.

Either way, you need to make it clear what changes, if any, have been
made to a particular file "in transit". With just 'diff -urN' and no
explanation, it is hard to tell one way or the other.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:52    [W:0.032 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site