Repository navigation
Labels
documentationIssues related to the documentation
Description
This issue replaces the ones that relate to fundamental issues with how our ignores work. The following is the up to date list of requirements:
Certain Requirements
- Must be understandable by someone who understands the interface in use by DropBox, OneDrive, etc.
- Must be a simple tree view with checkboxes
- Root of tree (=folder root) checked by default
- Can uncheck root and then check just the branches that we want synced
- Must be able to black list extensions
- Must live in config (not .stignore files)
- Must "live update". That is, if I ignore a file that was going to be pulled, we should not pull it. If I unignore a file that we are missing, it should be pulled shortly thereafter.
- Must be able to specify if ignored files should be preserved or removed on directory delete.
- Per what though? File extension? Directory?
- Power user access to flexible, underlying patterns
- Be able to to remove files for folders that are not picked, as it remove things that are now ignored.
- Have inclusion and exclusion mode, ignore everything, include X, versus include everything, ignore X.
Maybe?
- Per directory file extension black lists ("never sync
*.tmp") - Per directory file extension white lists ("only sync
*.doc") - Should sync between devices
- Ability to ignore a directory by the presence of a special file in it (
cachedir.tag).
Comments and discussion below. A project maintainer will keep the list above in sync as the requirements change or are clarified. Note that this is not a list of problems with the current system, but requirements for a new system.
Reacted by Florian Kaiser, Aleksey Lobanov, Dmitry Semenov, Wulf Weich, Samuel Bancal, Mag A, Roman Starkov, AlexKG, Nutomic, Cristian Beskid and 106 more
Reacted by Ander Punnar, Pazuu, James, Slomo, jesse-git, Ashhar Hasan, Pierre Penninckx, Zac Scott, Moritz Hedtke, Ein Verne and 1 more
Reacted by Gürkan
Reacted by Pazuu, rudolf1, Mikhail Mutcianko, Andrea Bueide, Pierre Penninckx, James, Slomo, jesse-git, Paul Beach, Ultimate and 11 more
Reacted by Adam Russell
Sub-issues
Collapse Sub-issuesSub-issues
Loading 2 sub-issues
Metadata
Metadata
Assignees
Labels
documentationIssues related to the documentation
Activity
crccheck commentedon Nov 19, 2015
Why not also keep
.stignore, but make it sync between devices as.gitignoreand.hgignoredo? That way, there's a developer friendly way to keep files out. As someone who had to delete 100knode_modulesfiles yesterday (not to mention.DS_Store,packages,build,.tox, etc), that would have save me 3 gigs of bandwidth and time.There's two distinct user stories:
calmh commentedon Nov 19, 2015
A
.fooignorefile might come naturally to developers, but that's really the only demographic that expects a hidden file with a bizarre extension (think Windows). I think it's a developer accident that it exists at all in it's current form today - it's really a piece of folder configuration as anything else. Not having it in the folder itself also works better with read only folders - perhaps you want to share the contents of a DVD-ROM... (This also requires handling the non-existence of .stfolder, but there's a ticket for that.)Whether it syncs or not is really somewhat beside the point of the existence of the file, but I do think there should be at least an option to sync the patterns, yes.
(You can do that today with a little #include hackery as well.)
To bring it more in line with the actual ticket; what's the actual requirement that having an
.stignoreon disk fulfills?cdhowie commentedon Nov 19, 2015
I don't care where the ignore data is stored, but patterns allow me to express ignores in a concise manner and with more flexibility than a tree option. Please at least retain this functionality, if not in a file called
.stignorethen somewhere else. None of the options provided in this ticket summary will meet my needs.If the current pattern-based ignore option is removed I'm afraid I may have to stop upgrading Syncthing, as versions without pattern-based ignore wouldn't meet my needs.
calmh commentedon Nov 19, 2015
@cdhowie What are the needs, that are not covered by the tree options and the extension white/black lists?
cdhowie commentedon Nov 19, 2015
There is no accommodation for prefixes in the current proposal. I can't be the only one with a
._*ignore.Neither is there a way to express a pattern along the lines of "ignore all objects named
binunder directoryfoo" whereas we can do that today withI'm not asking you not to implement a nicer interface for new users, I'm asking you not to sacrifice the power users on the altar of the masses.
calmh commentedon Nov 19, 2015
Well, currently the masses are being lead to the slaughter en masse as they try to work the ignore system, so some sort of balance there is required. :D
The prefix thing is a good point, and should probably be supported somehow. I need to think about the last one...
AudriusButkevicius commentedon Nov 19, 2015
So the two could coexist, but power users will have to grasp their concepts around about the order in which it gets executed, etc.
calmh commentedon Nov 19, 2015
Well, yes. At some point whatever the user is configuring, graphically or text based or however, is going to to get compiled into some list of match objects of some kind. Today that's a list of regexps, unfortunately that's a bit inefficient to evaluate. But something like that; whatever it ends up being could of course be exposed in some way so that they can be input directly into the config or something.
cdhowie commentedon Nov 19, 2015
I would absolutely be happy with that resolution, if there is a (somewhat) easy way to edit this in the GUI. Like an "advanced" button at the bottom of the simple UI that opens the list of compiled patterns, letting me fiddle with them.
(I'd be willing to contribute dev time to making that happen, as this is an important feature for me.)
calmh commentedon Nov 19, 2015
Possibly. The way I could envision it in that case is that you'll probably have a simple default layout with a tree view and a list of extensions or something. Switch to advanced mode and you get the compiled patterns or something and can edit them at will. But once you've done that, you probably won't be able to switch back, as what you created in the advanced mode might not be expressible in the simple mode.
cdhowie commentedon Nov 19, 2015
Same thing I was thinking. Or, you can switch back, but you'll get a warning that your manually-modified patterns will get destroyed if you do.
AudriusButkevicius commentedon Nov 19, 2015
I think we can keep what we have today and keep it the same way it is today, just add a thing before ignores which is the dir selector.
calmh commentedon Nov 19, 2015
Okay I added that to the requirements
88 remaining items
hlovdal commentedon Oct 11, 2020
I have read through all the comments here and one takeaway is that syncthing ought to have something probably named Folder ignore profiles.
desktop,laptopandtablet..stignorefile on the new blank device..stignorefile along with any files it includes (recursively) are the first files that are synchronized. Synchronization of all other files are delayed until this is done..stignorefile (and included files) is never automatically updated again, even if the profile is modified.The above can be implemented today without any dependency to any new ignore behaviour, and it will fully address the forget and race condition issues that @madumlao raised.
The above should represent a complete MVP. Some smaller additional features that could be added later:
The force propagation ting might not be that important since it effectively already can be achieved with a simple
#include .stignore.mobile.philipbowser commentedon Dec 7, 2021
This seems like the way to go. Have the tree view checkboxes just populate the ignore pattern text box with the specific include/exclude patterns, then advanced folks can still add their advanced patterns if they need it.
I think the most crucial elements of this, even if a tree-view with checkboxes isn't implemented, are the needs to see what files and folders have not been synced yet (so you don't have to download potentially hundreds of gigs of data just to find out what to ignore) and to have this be a per device setting. If you could see a representation of what you don't have on your computer, and check a box to start syncing only the folders you need, then Syncthing would be easy to deploy in a mixed skill level environment where not everyone who's using the share is a power user.
junkhacker commentedon Jan 6, 2022
i've tried to find if this has been suggested before and i don't see it if it has been, but i'd really like to see the option of adding a "ignore-missing" flag on includes.
the ability to have just a simple
#include .stglobalignores ignore-missingi think this would solve many people's issue regarding the desire to propagate ignore patterns without the issue of syncing stopping due to a failure to load the ignore patterns until the included file is synced.
a possible enhancement on the idea might be for new folder syncs that get created with a #include rule in their .stignore to seek out the existence of the file (first locally, then on other nodes) to sync before any other files (unless the included file is ignored itself within the ignore settings, of course)
jtagcat commentedon Jan 6, 2022
The ignore-missing part can be considered a part of the path / second path;
#includeopt/#includeoptionalcould be used instead (internally checking if the file exists, and calling include when it does).junkhacker commentedon Jan 6, 2022
fair point. i don't care about the syntax so much as the feature. plenty of ways it could be specified like:
#optionalinclude#(?)include#(?m)include(m for missing)but i really think this would bridge the gap for features that a lot of people would like without adding a bunch of extra complexity to the ignore rules.
madumlao commentedon Jan 12, 2022
Just want to point out that I very recently added a machine to my syncthing cluster and I was pleasantly surprised to see that the
.stignoreand.stignore_syncedwere automagically synced without me having to do anything.I definitely don't recall this being there before, so whichever version this was added in, bravo.
imsodin commentedon Jan 12, 2022
This issue is not meant as a catch-all container for any discussions related to ignores. I am locking it now, because the comments got more frequent and are detracting. If you have a question about ignores, something you think needs to be added to the info present in this thread or anything else related to ignores, open a topic on https://forum.syncthing.net
And just to not leave this incorrect piece of information lingering as the last info in this thread:
The file
.stignore_syncedhas always been synced, and a file.stignoreat the folder root is still not synced.