You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would suggest to introduce a global ignore list, that has some default entries. For example: .git/ # ignore git repros .sparkleshare/ # ignore git sparkleshare .~lock. # ignore LibreOffice lock files .owncloudsync # ignore owncloud
It is annoying to add to each folder on each node every time all files you want to be ignored.
Reacted by contrapunctus-1, sysfu, Kyle Cascade, Richard Phuker, Роман Корцаков, 林博仁 Buo-ren Lin, Hörmet Yiltiz, Jonathan, tech189, Benjamin Kulnik and 35 more
Reacted by Élia „KopfKrieg“, Anton Larionov, jtagcat, Filip M. Nowak and Michael Campbell
Reacted by endolith, Stanislav Eprikov and ⁂ Tommi
I'm not convinced. I see how that's useful in your case, but what about the hundreds of other kinds of files people might want excluded (temp and lock files for every other office package, .svn if you include .git, etc). Also, I do want my .git folders backed up for sure. I think this is a case where there isn't a list that will make everyone happy, and just leaving it up to the user in all cases is simpler.
Reacted by heX16, Quentin Hibon, Élia „KopfKrieg“, Jonas Schürmann, nerdCopter, Nato Boram, Thomas Merz, jtagcat, Justin Ormont, Matthew Leather and 8 more
I don't think he meant THAT globally, OP means having a global configurable ignore list that applies to all folders of the specified node.
Reacted by Felix Divo, Jonas I. Liechti, Lapo Luchini, Pavlos Vinieratos, e-g1gor, Nato Boram, endolith, Matthias Beyer, Gal Lalouche, Richard Phuker and 16 more
I would like this as well. Vision of going around 6 machines * 8 repos just to ignore .pyc, .class and bin/ makes current method of ignoring files pretty-much unusable for me.
Reacted by endolith, Mr Beedell, Roke Julian Lockhart and Rdkang
There already is a #include directive, which means as long as all of your repos/folders include the same file, it will be global.
You can also keep the file synced between machines by having it in one of your folders.
I do not see ignores shared between devices in any other way.
I do perhaps see a global ignore list which gets added on top of each folders ignores as a useful feature, but the case is so niche and specific to a certain group of people who can already solve/automate it in other means just because they can.
There will only be the initial cost of setting the include on all your devices and all your folders, but I am sure you can automate this with a bash one-liner.
But #include practically means that I have to go around 6 machines * 8 repos to #include some synchronized file :)
And automating that it's harder than it looks - i have Windows machines (no bash there), Android devices (no ssh there)... Having something like .stglobalignore #included by default would solve this easily and it doesn't sound hard to implement (to someone who never coded go, ofc)
Yeah, and then I can go around 6 machines and run that script :D
By the way, as I already said, I don't speak go, but based on what I caught from sources, wouldn't this two-liner enough to add new, auto-included ignore file?
Yeah, so I responded to the "default entries" and not really to the "global ignore list" part. A global (as in it applies to every folder on a given device) ignore list I would be OK with. It would need to be stored in the config (just as an implementation note).
Reacted by endolith, Misha Krieger-Raynauld, jtagcat, Stanislav Eprikov and Salim B
I like the fact that Syncthing doesn't litter the directories that are to be synced. Therefore I don't like it that .stignore files have to be put into the directories. Of course I am free not to use that feature, but could it be possible to have an ignore-file somewhere in the .config/syncthing? It could also serve as a global-ignore file as per the topic of this thread.
I'm also not convinced about the .git and .sparkleshare ignores as I also sync my .git folders.
However, OS-specific temporary files should be filtered imo as they generate conflicts outside the user's actions (as proposed in #1055).
A .stglobalignore or somesuch outside of the actual folders-to-be-synced would be better for my use case. I really don't like to need to litter my folders with .stignore files.
I agree for those. And I'm not saying there is never cause to ignore thumbs.db, just that if it's not clearly the right thing to do I don't think we should do it automagically for the user. So I think the set of files to auto ignore is a bit smaller than what's suggested in a couple of places. For example the list of things git autoignores (links a fair bit up) is super inappropriate for us.
So I think the set of files to auto ignore is a bit smaller than what's suggested in a couple of places. For example the list of things git autoignores (links a fair bit up) is super inappropriate for us.
I agree.
But what about my Thumbs.db conflict example? Don't you agree that 99% of users would want to ignore that file? (Also keep in mind that Thumbs.db isn't invisible on Linux, for that reason alone I always want to ignore it)
Yeah just making conversation on issues that popped on my notification list... We're going to bikeshed the shit out of this when it becomes a PR, that's for sure. 🚲 🏠🖌
Reacted by Jan Niklas Hasse, Jonathan Cross and Christopher Loessl
Having a default set and then the ability to add to that list on a per-device basis would be nice.
I would assume the basic list should look something like:
# From Windows
$RECYCLE.BIN
System Volume Information
$WINDOWS.~BT
pagefile.sys
desktop.ini
# From OS X
Icon?
.Spotlight-V100
.Trashes
.DS_Store
.fseventsd
# From Linux
lost+found
.gvfs
.local/share/trash
.Trash-*
# Generic stuff
._*
$RECYCLE.BIN (case insensitive, since newer Windows versions use $Recycle.Bin) is the per-drive recycling bin for Windows
$WINDOWS.~BT is a temporary directory used for OS upgrades on Windows (and is often huge if it exists). I've only ever seen this on the C: drive, but I think it shows up on a different drive if there's not enough room on C:.
.fseventsd is something I see a lot on removable media. I'm not 100% certain what OS it's from, but it looks like ancillary volume metadata (which makes me think it's probably OS X), so it probably shouldn't be synced.
.gvfs is found in most people's home directories on Linux when they use most desktop environments other than KDE, and shouldn't be scanned because it covers dynamic access to access transiently connected and non-filesystem items (network filesystems, archives, MTP devices, etc)
.local/share/trash is the per-user trash-can for XDG compliant desktop environments on Linux (which is 90% of what people who use X use on Linux).
Regardless of what platform we're on, we should use the same default excludes for consistency (and because people do share storage devices between systems).
If Syncthing could simply use the .gitignore format and extend it for their needs, I think it would've been a better solution than a default list.
Then, to automate adding the ignore file on each machine and each folders, one could simply curl https://www.gitignore.io/api/linux,macos,windows -o .stignore each folders.
But also a global .stignore in Syncthing's configs would also be a very efficient way of dealing with this.
We can't use gitignore because our format is already different, plus it has control sequences that control what happens if the file is detected ((?d)/(?i)) etc.
Then Syncthing should add a feature to migrate the well-known .gitignore file into their custom .stignore. It's the one inventing their own format, they should be responsible for creating an easy way to use it.
Reacted by endolith and Mr Beedell, Roke Julian Lockhart
It shouldn't, because there is disagreement in what the format is able to describe, so if we were to follow what you are suggesting, we'd have to remove features that people currently rely on.
The .gitignore ship has sailed many moons ago, so people should stop bringing this up, as this is going nowhere. People can use it as a reference for coming up with their ignore list, but its not a format we can go for.
Git itself is also a super niche tool used by a tiny clique of people in the world. I realize it’s a vocal minority here given the site we’re on, but that doesn’t really matter in the grander scheme of Syncthing users generally. So what Audrius says, let’s stop talking about gitignores.
Reacted by Evgeny Kuznetsov, Simon Frei and Hörmet Yiltiz
Reacted by Samuel Graenacher, Mr Beedell, Roke Julian Lockhart, Anand , Antony Gelberg, Justin Godesky, Nato Boram, Dominik Stańczak-Marikin, Ryan W. West and Awqre
So far, trying to sync a folder which somehow contained (not directly) a version control repository (e.g. .git) corrupts the .git/* objects unpredictably --- it doesn't happen all the time and doesn't corrupt all the repos; just happens sometimes for some repos under some weird race(?) conditions. We can argue if .git is a niche tool but consider this: the number that really matters here is the conditional probability of a syncthing user also using git aka p(uses git | uses syncthing). I bet this number is fairly high, meaning we should not ignore a large portion of our current user base.
There is a much stronger point here about usability by default; a backup software should never corrupt what is already there. Syncthing by default can and will corrupt .git projects at some point. I have a few projects of mine corrupted and had to rm -rf .git and start afresh again.
The solution, however, breaks nothing and is simple; just include default ignore lists. Yes, we cannot have an exhaustive list of everything one would like to ignore, but that shouldn't stop us from trying our best.
If it matters, I volunteer to tally up the people who care about this enough to type a few sentences here over the past five years. This by no means is representative of the masses, but better than not having numbers on the table.
Reacted by Mr Beedell, Roke Julian Lockhart, Pagalba.com, Ming-Long Huang and code_monk
Wild idea on extending/updating the .stignore feature:
First: Use the file '.stignore' (the current filename) and add to that the directory '.stignore.d' and all files (recursive) in it.
Reason: There everyone can ad there and/or with dedicated ignore patterns for that area.
Second: Read the .stignore and .stignore.d (in this order) from the software installation location (default: file containing ".stignore"), the 'standard map location' and the root of the current tree-to-sync.
Major change: do sync the .stignore file and .stignore.d tree in the current tree-to-sync. If you donnot want to do so, Just add "/.stignore" to one of your .stignore files.
To keep up with the current configuration: Add "/.stignore" to the .stignore in the installation directory. The I can put "!./stignore in the .stignore file in the three and it is synced to my wishes.
Activity
calmh commentedon Oct 13, 2014
I'm not convinced. I see how that's useful in your case, but what about the hundreds of other kinds of files people might want excluded (temp and lock files for every other office package,
.svnif you include.git, etc). Also, I do want my.gitfolders backed up for sure. I think this is a case where there isn't a list that will make everyone happy, and just leaving it up to the user in all cases is simpler.Goobles commentedon Oct 13, 2014
I don't think he meant THAT globally, OP means having a global configurable ignore list that applies to all folders of the specified node.
gunwald commentedon Oct 13, 2014
Ok, you maybe right. But then it would be useful to have a global ignore list anyway. May be without default entries.
AudriusButkevicius commentedon Oct 13, 2014
ln -sfrom your other folders.gunwald commentedon Oct 13, 2014
Ok, but you have to do this for all folders and on all nodes and that is much work.
kozec commentedon Oct 13, 2014
I would like this as well. Vision of going around 6 machines * 8 repos just to ignore .pyc, .class and bin/ makes current method of ignoring files pretty-much unusable for me.
AudriusButkevicius commentedon Oct 13, 2014
There already is a
#includedirective, which means as long as all of your repos/folders include the same file, it will be global.You can also keep the file synced between machines by having it in one of your folders.
I do not see ignores shared between devices in any other way.
I do perhaps see a global ignore list which gets added on top of each folders ignores as a useful feature, but the case is so niche and specific to a certain group of people who can already solve/automate it in other means just because they can.
There will only be the initial cost of setting the include on all your devices and all your folders, but I am sure you can automate this with a bash one-liner.
kozec commentedon Oct 13, 2014
But #include practically means that I have to go around 6 machines * 8 repos to #include some synchronized file :)
And automating that it's harder than it looks - i have Windows machines (no bash there), Android devices (no ssh there)... Having something like .stglobalignore #included by default would solve this easily and it doesn't sound hard to implement (to someone who never coded go, ofc)
AudriusButkevicius commentedon Oct 13, 2014
You can write a small go script, cross compile it to all platforms, spread it using syncthing, and then invoke it on each machine ;)
kozec commentedon Oct 13, 2014
Yeah, and then I can go around 6 machines and run that script :D
By the way, as I already said, I don't speak go, but based on what I caught from sources, wouldn't this two-liner enough to add new, auto-included ignore file?
http://pastebin.com/xDApEVL3 (model.go)
calmh commentedon Oct 13, 2014
Yeah, so I responded to the "default entries" and not really to the "global ignore list" part. A global (as in it applies to every folder on a given device) ignore list I would be OK with. It would need to be stored in the config (just as an implementation note).
calmh commentedon Oct 13, 2014
@kozec Theoretically you could automate it through syncthing though, today, using a POST request to the admin interface to set the ignore list per folder. @AudriusButkevicius that should probably be documented in https://discourse.syncthing.net/t/the-rest-interface/85.
pepa65 commentedon Oct 18, 2014
I like the fact that Syncthing doesn't litter the directories that are to be synced. Therefore I don't like it that .stignore files have to be put into the directories. Of course I am free not to use that feature, but could it be possible to have an ignore-file somewhere in the .config/syncthing? It could also serve as a global-ignore file as per the topic of this thread.
Zillode commentedon Dec 1, 2014
I'm also not convinced about the .git and .sparkleshare ignores as I also sync my .git folders.
However, OS-specific temporary files should be filtered imo as they generate conflicts outside the user's actions (as proposed in #1055).
pepa65 commentedon Dec 1, 2014
A .stglobalignore or somesuch outside of the actual folders-to-be-synced would be better for my use case. I really don't like to need to litter my folders with .stignore files.
70 remaining items
calmh commentedon Dec 21, 2016
I agree for those. And I'm not saying there is never cause to ignore thumbs.db, just that if it's not clearly the right thing to do I don't think we should do it automagically for the user. So I think the set of files to auto ignore is a bit smaller than what's suggested in a couple of places. For example the list of things git autoignores (links a fair bit up) is super inappropriate for us.
jhasse commentedon Dec 21, 2016
I agree.
But what about my Thumbs.db conflict example? Don't you agree that 99% of users would want to ignore that file? (Also keep in mind that Thumbs.db isn't invisible on Linux, for that reason alone I always want to ignore it)
canton7 commentedon Dec 21, 2016
Agreed. I was just making sure we didn't discount the idea entirely 😄
(On the thumbs.db point, I agree with @jhasse that it should be ignored, but we're heading off into bikeshedding territory...)
calmh commentedon Dec 21, 2016
Yeah just making conversation on issues that popped on my notification list... We're going to bikeshed the shit out of this when it becomes a PR, that's for sure. 🚲 🏠🖌
Ferroin commentedon Dec 21, 2016
Having a default set and then the ability to add to that list on a per-device basis would be nice.
I would assume the basic list should look something like:
$RECYCLE.BIN (case insensitive, since newer Windows versions use $Recycle.Bin) is the per-drive recycling bin for Windows
$WINDOWS.~BT is a temporary directory used for OS upgrades on Windows (and is often huge if it exists). I've only ever seen this on the C: drive, but I think it shows up on a different drive if there's not enough room on C:.
.fseventsd is something I see a lot on removable media. I'm not 100% certain what OS it's from, but it looks like ancillary volume metadata (which makes me think it's probably OS X), so it probably shouldn't be synced.
.gvfs is found in most people's home directories on Linux when they use most desktop environments other than KDE, and shouldn't be scanned because it covers dynamic access to access transiently connected and non-filesystem items (network filesystems, archives, MTP devices, etc)
.local/share/trash is the per-user trash-can for XDG compliant desktop environments on Linux (which is 90% of what people who use X use on Linux).
Regardless of what platform we're on, we should use the same default excludes for consistency (and because people do share storage devices between systems).
CONSULitAS commentedon Apr 29, 2017
Hi,
i am just having the problem of having an error while syncing with the OS X Icon file (
filename is invalid)!After thinking about the Problem that @flungo mentioned, that Icon? ignores the rather common
Iconsi would suggest the following:Regards
NatoBoram commentedon May 29, 2020
There's already a list of sane
.gitignore: https://www.gitignore.io/api/linux,macos,windowsIf Syncthing could simply use the
.gitignoreformat and extend it for their needs, I think it would've been a better solution than a default list.Then, to automate adding the ignore file on each machine and each folders, one could simply
curl https://www.gitignore.io/api/linux,macos,windows -o .stignoreeach folders.But also a global
.stignorein Syncthing's configs would also be a very efficient way of dealing with this.AudriusButkevicius commentedon May 29, 2020
We can't use gitignore because our format is already different, plus it has control sequences that control what happens if the file is detected ((?d)/(?i)) etc.
NatoBoram commentedon May 29, 2020
Then Syncthing should add a feature to migrate the well-known
.gitignorefile into their custom.stignore. It's the one inventing their own format, they should be responsible for creating an easy way to use it.AudriusButkevicius commentedon May 29, 2020
It shouldn't, because there is disagreement in what the format is able to describe, so if we were to follow what you are suggesting, we'd have to remove features that people currently rely on.
The .gitignore ship has sailed many moons ago, so people should stop bringing this up, as this is going nowhere. People can use it as a reference for coming up with their ignore list, but its not a format we can go for.
calmh commentedon May 30, 2020
Git itself is also a super niche tool used by a tiny clique of people in the world. I realize it’s a vocal minority here given the site we’re on, but that doesn’t really matter in the grander scheme of Syncthing users generally. So what Audrius says, let’s stop talking about gitignores.
hyiltiz commentedon Oct 27, 2020
So far, trying to sync a folder which somehow contained (not directly) a version control repository (e.g.
.git) corrupts the.git/*objects unpredictably --- it doesn't happen all the time and doesn't corrupt all the repos; just happens sometimes for some repos under some weird race(?) conditions. We can argue if.gitis a niche tool but consider this: the number that really matters here is the conditional probability of a syncthing user also usinggitakap(uses git | uses syncthing). I bet this number is fairly high, meaning we should not ignore a large portion of our current user base.There is a much stronger point here about usability by default; a backup software should never corrupt what is already there. Syncthing by default can and will corrupt
.gitprojects at some point. I have a few projects of mine corrupted and had torm -rf .gitand start afresh again.The solution, however, breaks nothing and is simple; just include default ignore lists. Yes, we cannot have an exhaustive list of everything one would like to ignore, but that shouldn't stop us from trying our best.
If it matters, I volunteer to tally up the people who care about this enough to type a few sentences here over the past five years. This by no means is representative of the masses, but better than not having numbers on the table.
beerse commentedon Dec 1, 2020
Wild idea on extending/updating the .stignore feature:
First: Use the file '.stignore' (the current filename) and add to that the directory '.stignore.d' and all files (recursive) in it.
Reason: There everyone can ad there and/or with dedicated ignore patterns for that area.
Second: Read the .stignore and .stignore.d (in this order) from the software installation location (default: file containing ".stignore"), the 'standard map location' and the root of the current tree-to-sync.
Major change: do sync the .stignore file and .stignore.d tree in the current tree-to-sync. If you donnot want to do so, Just add "/.stignore" to one of your .stignore files.
To keep up with the current configuration: Add "/.stignore" to the .stignore in the installation directory. The I can put "!./stignore in the .stignore file in the three and it is synced to my wishes.