Re: Feature request: confirm data loss when renaming folder with ignored files
Andre Colomb <[email protected]>
| Newsgroups | gmane.network.unison.general |
|---|---|
| Message-ID | <[email protected]> |
On 17/07/2023 20.41, Tõivo Leedjärv wrote: > Time for a summary. We have four different cases here. Thank you for this summary. I'd like to point out some prior art, namely how Syncthing does it. The ignore patterns are stored in a (non-synced) file named .stignore, not in the config / profile. Its syntax allows some prefixes to modify how patterns apply. Quoting https://urldefense.com/v3/__https://docs.syncthing.net/users/ignoring.html__;!!IBzWLUs!XbQGEyiFEsoT81V6lh2kHRlAZHIuP1PaybsPbBIFlX2OnTLPpcIEO2crJyyOzT77cAlR2sIMhYF6q93DOlrLb69SFj3N$ : > A pattern beginning with a (?d) prefix enables removal of these files > if they are preventing directory deletion. This prefix should be used > by any OS generated files which you are happy to be removed. > A pattern beginning with a ! prefix negates the pattern: matching > files are included (that is, not ignored). This can be used to > override more general patterns that follow. The former could be mapped cleanly to unison's preference system, as Tõivo already suggested. I'd prefer changing the "ignore" preference to cover your case B and introducing a new preference "ignore_allow_delete" (or similar) for case A, accepting the same directives as "ignore" and "ignorenot". The latter is the equivalent to Syncthing's ! prefix, although ordering is different. Since this is viewed as a bugfix, but some people may still want the old behavior for reasons, I think it warrants a new preference or a syntax extension for an existing one. Keeping the number of preferences small is not always the most important goal. Kind regards André -- To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].