Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regexp pattern accepted by --exclude option #16

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jimbrowne
Copy link

This builds on the patch from @NotDaveLane; I've needed to use regexps for excluding files rather than just simple substrings.

Probably want to pull in the simplification from @victorpoluceno as well.

@seedifferently
Copy link
Owner

@jimbrowne thanks for this...an --exclude arg has been planned for some time but my life has not allowed space for work on this project. I will add it to my list of "future TODOs."

@etiennesky etiennesky mentioned this pull request Oct 25, 2013
@etiennesky
Copy link

the Regexp patterns are different from those used in rsync right?

which simplification from @victorpoluceno are you referring to?

# determine if the file should be excluded according to command line arguments.
excludeFile = False
for excludePath in exclude:
if fullpath.startswith(excludePath):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is probably error-prone as it matches all directories that start with (but do not match exactly) the given exclude pattern

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants