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 feature to exclude symlinks based on where they point to #1029

Open
mschwaig opened this issue Apr 28, 2024 · 1 comment
Open

Add feature to exclude symlinks based on where they point to #1029

mschwaig opened this issue Apr 28, 2024 · 1 comment
Labels
effort-high issue is likely to require >20h of effort, perhaps much more enhancement issue is a request for a feature, and not a defect impact-low low importance wontfix maintainers choose not to work on this, but PR would still be considered

Comments

@mschwaig
Copy link

Feature Request

I am interested in specific functionality related to symbolic links on Linux.
I do not want to follow symbolic links, I think treating them as opaquely as files is fine, except that I would like to ignore specific symbolic links, basically skip them during sync, if the target path they point to starts with a specific prefix (In my case /nix/store).

Use Case

I am using Unison to sync parts of my user profile across my Linux-based client machines running NixOS.
Whenever you build a software package with Nix, the actual build results are stored in a global path that starts with /nix/store, but a symbolic link to the output is created in the current directory, so that you can find it and it does not get garbage collected.
Those links are in all my git project folders, and in some other places. Since their target paths are garbage collected, with the symbolic links preventing collection, those symbolic links are always valid, except when Unison syncs them.

Alternative Solutions

  • I don't know much about this, but my impression is that skipping all symbolic links would not be the right choice for what's usually in a user profile directory.
  • Not syncing symbolic links when they would be invalid at the destination host might also work.
@gdt gdt added enhancement issue is a request for a feature, and not a defect wontfix maintainers choose not to work on this, but PR would still be considered effort-high issue is likely to require >20h of effort, perhaps much more impact-low low importance labels May 23, 2024
@gdt
Copy link
Collaborator

gdt commented May 23, 2024

Please feel free to open a discussion on unison-users or hackers. There are a lot of questions lurking, such as soundness of any particular rules, complexity vs usefulness tradeoff, and certainly who if anyone might want to write code for it. I have a few other thoughts but discussions aren't appropriate for the bugtracker. I will likely hoist this to the 'features that aren't likely to be implemented' wiki page.

@gdt gdt changed the title Skip symoblic links / symlinks by target Add feature to exclude symlinks based on where they point to May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort-high issue is likely to require >20h of effort, perhaps much more enhancement issue is a request for a feature, and not a defect impact-low low importance wontfix maintainers choose not to work on this, but PR would still be considered
Projects
None yet
Development

No branches or pull requests

2 participants