Is there an equivalent of .stignore but synced between nodes by default?


For example, I have a “Projects/” directory, which contains a whole lot of apps, I don’t want database.phps synced, as each laptop I work on has slightly different database.php settings. For this kind of share in particular, there are files that should be ignored by all nodes, so it makes sense for the ignore patterns themselves to be synced.

What I do - and seems to be the recommended approach in syncthing - is I manually create a .stignore file on each node that #include's .stignore_synced, which contains ignore patterns I want synced. So obviously I put a pattern like that on all nodes with that share. Thing is, every time I add a node, I have to remember to create the file. If you’re initializing a new node, the syncthing interface can create the folder, but any shared ignore patterns will be created after the folder is created. This means it is possible - and very likely - that your new node will end up downloading files you meant for it to ignore in the short span of time before you add the .stignore. Not a dealbreaker, but annoying.

Is there - or can there be - an equivalent of .stignore but synced between nodes by default? That way every share I define I can just write the .stignore_synced and be confident that every new share will always include those patterns upon initialization.

(Audrius Butkevicius) #2

There is nothing like that of what you describe. You are using the right workaround.


Would you consider adding a “synced by default” stignore file in addition to the current “private by default” stignore file?

I understand it might add complexity though, since by its nature a synced ignore file should be synced first and I don’t know of any priority mechanism within syncthing.

(Jakob Borg) #4

No. The current workaround is easy, and there is a huge ticket for brainstorming the next generation of ignore system - which most likely won’t use ignore files at all. Look for “next gen ignores” in the issue tracker.