Re: Feature request: confirm data loss when renaming folder with ignored files
Jorge P. de Morais Neto <[email protected]>
| Newsgroups | gmane.network.unison.general |
|---|---|
| Message-ID | <[email protected]> |
Em [2023-07-12 qua 07:59:02-0400], Greg Troxel escreveu: > I think the answer is probably more or less "because ignored files are > not important, by the definition of what should be ignored." Then I suggest, at least, prominently document this interpretation. > Why are you declining to sync something that is important, while wanting > to sync the containing directory? I really am curious, because I find > that people are wanting to use ignore all the time, in ways that don't > make sense to me. The offending directive was: ignore = Path unison-stow-folding/emacs/.elfeed/* As the name suggests, I use Unison to sync my dotfiles between personal notebook and my workstation, and GNU Stow to deploy them as symlinks. For the Emacs Stow package I used the /folding/ feature of GNU Stow. That would make the directory ~/.elfeed itself a symlink to ~/unison/unison-stow-folding/emacs/.elfeed. But I did not want to synchronize everything in ~/.elfeed. Now I don't remember what I thought at the time; maybe I intended to synchronize Elfeed's configuration and metadata (such as tags) while leaving out the feed database which weighs some dozens of megabytes and didn't need to by synchronized via unison. I now realize I should have left ~./elfeed out of unison. Then recently I reorganized my dotfiles GNU Stow packages, and this triggered the data loss. *If* I remember correctly, on my workstation (which indeed didn't have Elfeed's database synchronized) I have renamed ~/unison/unison-stow-folding/emacs/.elfeed to ~/unison/home-stow-folding/all::emacs/.elfeed then synchronized it to my laptop. > One approach might be to make removing a directory fail if it is > non-empty (with the files that are supposed to be recreated moved > first). This will turn your data loss scenario into an annoyance for > many, but that seems reasonable. It is reasonably likely that it is a > small change, basically rmdir instead of rm -rf, or just declining to > enumerate and clean up. It's also reasonaly likely that it will cause a > lot of complaints. Maybe you could add a "cautious" command line option or configuration directive? Regards! -- - I am Brazilian. I hope my English is correct and I welcome feedback. - https://urldefense.com/v3/__https://www.defectivebydesign.org__;!!IBzWLUs!VbcWicG8Scvb1UG05QG4fMAB_4Fwh9TwRSl1p5g5MfZahwxXHjJaBpv3cUXU7h2_-uWrva3WqinIIs9_BMh6xvoHY2k$ "We oppose DRM. | Defective by Design" - https://urldefense.com/v3/__https://www.gnu.org__;!!IBzWLUs!VbcWicG8Scvb1UG05QG4fMAB_4Fwh9TwRSl1p5g5MfZahwxXHjJaBpv3cUXU7h2_-uWrva3WqinIIs9_BMh6SVieXWs$ "The GNU Operating System and the Free Software Movement" - Many people hate injustice but few check the facts; this causes more injustice. Ask me about <https://urldefense.com/v3/__https://stallmansupport.org__;!!IBzWLUs!VbcWicG8Scvb1UG05QG4fMAB_4Fwh9TwRSl1p5g5MfZahwxXHjJaBpv3cUXU7h2_-uWrva3WqinIIs9_BMh6IWmAqEw$ > -- To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].