-
Notifications
You must be signed in to change notification settings - Fork 669
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
Per-directory sync exclusions #1558
Comments
+1 for this enhancement but allowing local exclude files within folders would be more useful as I said in my duplicate suggestion #4068 |
I'm waiting this feature, too |
Pretty please, I thought the current ignore settings were like that and got burned after I confifgured the server and everything. |
This was to verify client issue #1558
Have you checked exclude patterns like
That works. See d89edc3 |
I really like this idea and was just about to submit the same ticket when I luckily found this one. I like to point out that this is not only about LaTeX output. For me this feature would mean
Furthermore I would recommend using the syntax from .gitignore-files (or an extension), as it is easy and those files are quite common (and therefore, their syntax). Furthermore one could be symlinked to another instead of duplicating the file (Of course the client could allow the user using .gitignore-files itself). |
+1 from me as well. Any news from ownCloud team... is this something anyone is working on? Would a patch be accepted if I implemented it? ~Jørn |
Please comment on #1558 (comment) |
@hodyroff Re user experience:
I notice this is basically what @eigengrau suggested. Are there any problems with this approach? |
+1 for this feature |
This would be useful for me as well, e.g. for excluding node_modules and build outputs (something like |
I've been scouring the docs, but haven't found an elegant solution yet. I just realised I've been syncing couple of GB of Rust A lot of other repos also sync all my build artefacts across and I'd like to avoid hardcoding paths on each of my machines, and check in a |
@TheOneRing Thanks for pointing me to this issue. This seems to be a highly requested feature, which unfortunately has not been implemented in the past 7 years. Maybe it would be helpful, if one of the core developers could shed some light onto why this feature is not being addressed and what the community could do to help with the implementation. Thanks. |
@TheOneRing Would you mind helping with this issue? Either directly or by pinging the most suitable developer(s)? |
@ogoffart @dragotin @michaelstingl Since @TheOneRing is apparently unavailable for this issue, maybe one of you can help? Is this feature wanted by the Owncloud team? If not, when why not? If yes, then what could the community do to speed up the implementation and what would reasonable first steps look like? Thanks! |
Is there any chance this will be implemented some day? I have like 40 git repos which I don't want to be synced spread in different places and I have to add them manually to the ignore list via the client editor on all my devices. Exhausting. |
Pro tip: Don't add stuff you don't want to be synced to your sync folder. |
@TheOneRing I must say that your "pro tip" came across a little snippy. After all, you don't know the use case of @HeyHouBenjo and I think there are very legitimate reasons to have git repos that you don't want to be synced in a larger context of data, that you want to be synced. And I'm fully aware that this is FOSS, so there is nothing the users can demand, but it would have been much more helpful, if you had directed us to a starting point to implement the solution ourselves. |
Unfortunately, I am one of those "Need to sync my complete Documents folder" guys, because otherwise, I wouldnt need to ignore 40 git repos, but rather create like 30 synced folders /: |
I'm aware that my comment was not very productive, my suggestion however is that you sync your whole Documents folder, create an additional directory Src in your home folder and place the git repos there. Additionally placing files you don't want to sync in to a different folder will save you from surprises like unsynced files due to a tiny error in an ignore pattern. The feature you request sounds simple, however parsing the ignore list for each folder in a huge file tree would probably have a bad performance. I saw the .gitignore files mentioned as an example, however while git will usually visit a folder once we will regularly scan the folder. We can either keep a rather complex tree of excludes in ram or compute the recursive tree over and over again. On the ux I see a different hurdle. The amount of QA needed would be huge. You can of course say its a pro feature but that won't keep non pro users from playing with it. TLTR: This is not a tiny improvement, this is a complex change for a niche audience. |
Thank you for the explanation, I will look into exporting all git repos from my Documents folder into /home/src. However, I saw this thread |
This would only ignore the |
I think you're getting me wrong here, I meant to exclude a complete folder X only if there is a file or folder Y in it and the pattern |
Yes I got you wrong sorry. |
@TheOneRing would there be a large performance hit if I were to manually add a bunch of folders to the exclude list? |
One central exclude list is no problem, its exactly what we have right now so that sounds possible. |
@TheOneRing Thanks for the helpful input. The user's exclude list is located in |
The supported way is to use the settings ui but as long as you stick to the format it should work. |
@TheOneRing Out of curiosity, I just recursively iterated all files in my owncloud directory (~1,2 million files, 250GB, please don't judge me 😅) and it took ~3 seconds. For the sake of a better understanding, what would cause the large performance hit, if not the file iteration itself? |
We have users with insane folder structures and the performance hit I'd expect would come from the parsing of an exclude file for in theory every single folder. (Yes that is not very realistic). So my estimation is lots and lots of effort, lots and lots of qa, added complexity, potential bad ux, and a tiny gain. |
I see, thanks for elaborating. Is there a way to hook into the syncing process (e.g. specify a script that is executed before the sync? Then users could just write a script to automatically parse their |
My plan was to keep it simple. If a folder has a I'll go with the external script route adding fully defined paths to the global exclude list. |
In the meantime Nextcloud already implemented |
It would be a useful enhancement if sync exclusions could not only be specified globally, but also per directory. E.g., I often would like to ignore the intermediate output of my LaTeX-projects (*.out, *.run.xml, etc.). I cannot ignore these glob patterns globally, since they are also used by files which I would like to sync.
A possible solution would be to allow local
.sync-exclude.lst
files within folders. These exclusion lists would apply only to paths within and below the directory within which they are placed.An alternative approach would keep the global exclusion list, but allow
**
in glob patterns to match across subdirs recursively (same as the Bash “globstar”). E.g., this would allow specifying a patternlatex/**/*.out
to match .out files only if they are somewhere beneathlatex/
.The text was updated successfully, but these errors were encountered: