Question

I tried running 'diff' against two source directories get a patch file with a 'diff' between the two directories.

diff -rupN flyingsaucer-R8pre2_b/ flyingsaucer-R8pre2/ > a.patch

The command above does not seem to work, it generates a diff of everything and I get a 13 MB file, when in reality, it should be a couple of changes.

Was it helpful?

Solution

Should work with any recent version of gnu diff (tested here with gnu diff 2.8.1.)

You might want to add -b (and perhaps -B) to ignore difference in white space which perhaps generate large patch files unnecessarily.

OTHER TIPS

I don't see any reason why it wouldn't work. Try adding "wb" to the argument list to ignore whitespace changes. Are you sure you got the trailing slashes the same on both sides?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top