Open CristianCantoro opened 3 years ago
In general this is something I'm happy to approve.
As I mentioned in https://github.com/elliottslaughter/integrity-checker/issues/3#issuecomment-596660999 we use the ignore crate, which theoretically ought to provide all the options to do this.
One minor point of bikeshedding: since ripgrep will already have names for all of these options (since that's what the ignore crate was created for) it would probably be good to reuse those names so we're using consistent naming with the rest of the ecosystem.
I'm not sure when I'll have time to look at this, maybe in the next couple weeks. If it's a simple change I can potentially look at it sooner.
@elliottslaughter wrote:
One minor point of bikeshedding: since ripgrep will already have names for all of these options (since that's what the ignore crate was created for) it would probably be good to reuse those names so we're using consistent naming with the rest of the ecosystem.
I see that in ripgrep
the option is called --hidden
, I am not sure that we should be that attached to the semantics of another program and have clear names for the options of ick
.
I'm open to other suggestions. ripgrep
is hardly universal, so I'm fine with going a different way. However, the further we go (semantically) the more work we'll have to do ourselves that will not be supported out of the box by the ignore
crate.
Another program that's relevant (as far as precedent goes) is probably tar
, which has flags --include
and --exclude
(but as far as I know doesn't have anything based on a .gitignore
syntax or similar).
We could also look at other backup programs, though I'm not as familiar with those or how they handle this.
Currently
ick
ignores hidden files. I suggest adding an option-H, --add-hidden
to consider them.I am not entirely sure what shuld be the behavior when using
check
ordiff
, I have tried an implementation here: CristianCantoro/integrity-checker/tree/dev/hidden