Cygwin diff won't exclude files if a directory is included in the pattern
- by Dean Schulze
I need to do a recursive diff using cygwin that needs do exclude all .xml files from certain directories, but not from other directories. According to the --help option I should be able to do this with with the --exclude=PAT option where PAT is a pattern describing the files I want to exclude from the diff.
If I do this:
diff -rw --exclude="classes/Services.xml"
the diff does not ignore the Services.xml file in the classes directory. If I do this
diff -rw --exclude="Services.xml"
the diff does ignore the Services.xml file in all directories.
I need to do something like this:
diff -rw --exclude="*/generated/resources/client/*.xml"
to ignore all .xml files in the directory */generated/resources/client/.
Whenever I add path information to the --exclude pattern cygwin does not ignore the file(s) I've specified in the pattern.
Is there some way to make cygwin diff recognize a pattern that identifies certain files in certain directories? It seems to not be able to handle any directory information at all.