elliottslaughter / integrity-checker

Backup integrity checker
Apache License 2.0
21 stars 2 forks source link

Add support for .ickignore? #3

Open jimmcslim opened 4 years ago

jimmcslim commented 4 years ago

Would implementing a git style .ickignore file be a good idea? E.g. I'd love to ignore Mac OS .DS_Store files...

elliottslaughter commented 4 years ago

I believe that ick should obey .gitignore by default. (In fact what's missing is an option to turn that off.) Can you try that?

jimmcslim commented 4 years ago

I've just tried this and found that the presence of a .gitignore didn't have any impact, for a simple test.

elliottslaughter commented 4 years ago

Ok, maybe the ignore crate actually requires some configuration then. I'm a bit short on time at the moment, so if you want to look at this be my guest, otherwise this will go on my backlog of things to get to in the eventual future.

CristianCantoro commented 3 years ago

@elliottslaughter wrote:

Ok, maybe the ignore crate actually requires some configuration then. I'm a bit short on time at the moment, so if you want to look at this be my guest, otherwise this will go on my backlog of things to get to in the eventual future.

I have tried changing some options, but I am getting inconsistent behavior and most of the time it didn't work.

Furthermore, I think it would be better to have a separate file, named as .ickignore as proposed, instead of being based on.gitignore.

Finally, it would be nice if we could pass a file with a list of patterns to ignore, e. g. with an option like this --exclude-from ignore.txt.

I am thinking at the case of backups, many backup tools have this functionality of having a global list of paths to ignore, it is useful for full-systems backups for ignoring folders such as /tmp, /home/*/.cache or files like *~.

elliottslaughter commented 3 years ago

@CristianCantoro wrote: Furthermore, I think it would be better to have a separate file, named as .ickignore as proposed, instead of being based on.gitignore.

I'm fine with this.

Finally, it would be nice if we could pass a file with a list of patterns to ignore, e. g. with an option like this --exclude-from ignore.txt.

Yes, that sounds useful.

I am thinking at the case of backups, many backup tools have this functionality of having a global list of paths to ignore, it is useful for full-systems backups for ignoring folders such as /tmp, /home/*/.cache or files like *~.

Are you thinking about this in the context of the --exclude-from option above, or as some sort of a global configuration (~/.ickconfig or similar). I guess I'm more comfortable with the former than the latter.