views:

14

answers:

2

Hi.

Is it possible to add a full directory via diff and patch?

It seems as very convenient way to add additional modules on top of standard code-base.

I googled for some solutions, but they generally work on file level, not on directory level.

Thanks.

+1  A: 

Two quick suggestions--these should help

  1. You need the flag -r | --recursive

  2. You probably also need --unidirectional-new-file or -N | --new-file.

as I have done what you have in mind here.

Dirk Eddelbuettel
Thanks, it seems to work as well, though -P gives a bit more control to prevent accidental mistakes.
SyBer
Yes, I tried to help quickly. I have sample invocations at home that are probably closer to what you ended up with. Excluding CVS / SVN is also useful.
Dirk Eddelbuettel
A: 

Answering myself:

diff -urPp old_dir/ new_dir/ > new_module.patch

Seems to do the trick.

SyBer