Open tobyS opened 4 years ago
Thanks for the input. I think this is a reasonable request and something I've had to creatively work around myself. Selectively including/excluding content can become a tedious game of ignoring/unignoring content. I like your proposed design, though I'll probably need a few days to fully process it and understand how it would fit into Mutagen's current implementation and the range of issues it could address.
If I had to sketch a rough implementation, I think it would involve looking at alpha/beta URLs that contain wildcards, finding the longest path prefix of those URLs that doesn't contain a wildcard, and using that as the synchronization root. The wildcard-containing segment would then be used by the filesystem scanning to guide/limit its traversal.
The two immediate issues I foresee would be:
Perhaps Mutagen sync sessions could offer an alternative "ignore-by-default" mode, coupled with an "include" list setting. I vaguely recall a discussion along these lines years ago, which I may have argued could be accomplished with a list like:
- "*"
- "!/something"
- "!/something/*
...
but with recursive filesystem traversal these things quickly become complicated.
I'd have to do some session configuration mock-ups to see how much would actually be saved by doing something like an include list. It's clear that having a better way to specify these setups is necessary, though it's unclear to me whether it would be best accomplished through an include list, extended ignore syntax (without straying too far from .gitignore
), a wildcard shorthand in URLs, or simply a gallery of examples that show how to accomplish certain setups with minimal ignore settings.
Let me know if you have any additional thoughts. I'll continue to think about this as well.
We have certain files across our mono-repo setup which require special sync handling. It is easy to exclude these files from the standard sync using the
ignore.paths
specification. But adding the specialized sync for each individual file is a hassle. It would therefore be great if the specification ofalpha
would also allow wildcards.Usage Example
Proposed Simplification
Driving this further, it could be very useful for mono-repo setups to have full-fledged wildcard support in
alpha
specification, like: