〜/ x7 / music的根目录中有一些文件和文件夹.
我只需要同步sfx文件夹并忽略音乐中的任何其他内容.
我尝试过很多变种,但都错了.
ignore = Name music/* ignorenot = Regex music/sfx/.* (OR just *)
不起作用.
我期待用类似的东西
ignore = Name music/*^/
解决方法
ignore = Regex /root/path/to/music/.* ignorenot Regex /root/path/to/music/sfx/.*
There is also an
ignorenot
preference,which specifies a set of
patterns for paths that should not be ignored,even if they match an
ignore pattern. However,the interaction of these two sets of patterns
can be a little tricky. Here is exactly how it works:
Unison starts detecting updates from the root of the replicas—i.e.,from the empty path. If the empty path matches an
ignore
pattern and
does not match anignorenot
pattern,then the whole replica will be
ignored. (For this reason,it is not a good idea to includeName *
as anignore
pattern. If you want to ignore everything except a
certain set of files,useName ?*.
)If the root is a directory,Unison continues looking for updates in all the immediate children of the root. Again,if the name of some
child matches anignore
pattern and does not match anignorenot
pattern,then this whole path including everything below it will be
ignored.If any of the non-ignored children are directories,then the process continues recursively.