Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add steps for using globally ignored patterns #471

Closed
wants to merge 12 commits into from

Conversation

KeyWeeUsr
Copy link
Contributor

Introduces a way with #include to use a single file for globally ignored patterns and a way to unstuck a "stucked" syncing where multiple devices quickly create and remove a lot of files which might not be even desirable (for example .# for Emacs files or quite annoying .DS_Store for MacOS and desktop.ini for Windows).

Copy link
Member

@AudriusButkevicius AudriusButkevicius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I think this is written to much in a way of a guide oppose to a manual, and probably needs some grammar to be corrected.

users/ignoring.rst Outdated Show resolved Hide resolved
users/ignoring.rst Outdated Show resolved Hide resolved
users/ignoring.rst Outdated Show resolved Hide resolved
users/ignoring.rst Outdated Show resolved Hide resolved
users/ignoring.rst Outdated Show resolved Hide resolved
users/ignoring.rst Outdated Show resolved Hide resolved
@st-review
Copy link

🤖 beep boop

I'm going to close this pull request as it has been idle for more than 90 days.

This is not a rejection, merely a removal from the list of active pull requests that is periodically reviewed by humans. The pull request can be reopened when there is new activity, and merged once any remaining issues are resolved.

@st-review st-review closed this Jan 23, 2020
@KeyWeeUsr
Copy link
Contributor Author

@AudriusButkevicius ping?

@AudriusButkevicius
Copy link
Member

This needs more polish, but I can't be bothered to write the comments up on a phone. I'll try to get to a computer this evening to write it up.

Copy link
Member

@imsodin imsodin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on the docs - that's very much appreciated!

users/ignoring.rst Outdated Show resolved Hide resolved
users/ignoring.rst Outdated Show resolved Hide resolved
users/ignoring.rst Outdated Show resolved Hide resolved
users/ignoring.rst Outdated Show resolved Hide resolved
.. note::
This can be added even later with a lot of devices already being present
in Syncthing, but it's a way easier to set up ignoring in the beginning
than to include that global file to each device separately.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why, what does this help the user? I mean of course if you ignore from the get-go, you save some hashing/indexing, but that's got nothing to do with shared ignores, does it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's rather about the setting up of a single shared file because otherwise you'll pull the folder data first and if you have e.g. .DS_Store on Mac and you pull the data to Mac, that OS will pre-create .DS_Store if you attempt to open it in Finder and will result in Mac trying to sync .DS_Store files to a node that has such files listed as ignored.

If you want, I will remove it.


Although ``.stignore`` file is not synced between the devices, as mentioned
previously, it's possible to take advantage of an ``#include`` pattern
to create a single file that will hold shared ignoring patterns.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

create a single file that will hold shared ignoring patterns.

by creating a normal file that will be synced by syncthing, including that file on all devices using the #include directive, and placing all the ignore patterns there.

previously, it's possible to take advantage of an ``#include`` pattern
to create a single file that will hold shared ignoring patterns.

Assuming the content of a file ``.stignore-shared`` is::
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming the file is called ... and the content of it is ...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also add For example as it's a very detailed and specific example oppose to generic instructions.

(?d).DS_Store
foo

This file can be synced across all devices and helps with ignoring
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be synced ... and will help with ...


This file can be synced across all devices and helps with ignoring
``.DS_Store`` if you sync a folder between devices where at least one is
Mac OS and will also cause ``foo`` pattern being ignored on all devices.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"which is useful if you sync a folder between devices where one of them is using Mac OS."

This I am not sure of but (is it containing or is it starting?):

This will also cause any items containing foo pattern to be ignored on all devices.

``.DS_Store`` if you sync a folder between devices where at least one is
Mac OS and will also cause ``foo`` pattern being ignored on all devices.

The important part is to ``#include`` this shared ignore file per each
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"part is to use the #include directive on each device you want to use the shared ignore patterns"

...

// .stignore for N-th Device
#include .stignore-shared
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this example is very useful, as the above sentence sort of explains it already.

#include .stignore-shared

The shared ``#include`` does not exclude the possibility to add custom
patterns for single devices.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The #include directive does not prevent using additional ignore patterns applicable only to the local device.
Additional ignore patterns can be added before or after the include directive adjusting the order in which the patterns are processed.

.. note::
This can be added even later with a lot of devices already being present
in Syncthing, but it's a way easier to set up ignoring in the beginning
than to include that shared file to each device separately.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I sort of understand what the note is saying, "you should probably do it from the get-go", but I am not sure how this is helping the user.

Or is it trying to relay a different message?

@st-review
Copy link

🤖 beep boop

I'm going to close this pull request as it has been idle for more than 90 days.

This is not a rejection, merely a removal from the list of active pull requests that is periodically reviewed by humans. The pull request can be reopened when there is new activity, and merged once any remaining issues are resolved.

@st-review st-review closed this May 13, 2020
@syncthing syncthing locked and limited conversation to collaborators May 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants