I want to patch whole directory tree. Although diff finds all differences, patch does apply these to relevant files. When I change a file in subdir I can see patch crate that file one level above it should in the directory tree being patched.
I use command:
diff -Nur extern/ local/ | patch -d extern
what is wrong with that?
Since you’re passing -d dir (“Change to the directory dir immediately, before doing anything else.”) you also need to tell patch to strip off one level of directories with -p:
That’s because diff’s output will look something like this:
… so you need to get rid of that first prefix in the path.