I'm developing a script with (Groovy/Java) which compare two folders and generate a diff patch file in zip format. The thing now is i have to ignore some file within the iteration because they should not be included in the patch file.
Create a configuration file (like gitignore file) which list the path of ignored files in the comparison process.
I like to stick at convention/codestyle guidelines but now i cannot find any reference on how should this be done (not the code, i know how to do it) in terms of:
I hope i've been clear and my question is within SO's topic scope.
Thanks in advance
1 and 2 are addressed in gitignore
man page: the .gitignore
file would be part of the source files you are scanning and would apply to files from the .gitignore
folder and below.
It uses a glob pattern, like fnmatch
does (meaning: no regexes).
If it was an actual git repo, git check-ignore -v -- afile
could tell you if that file is ignored or not.