Skip to content

dvc: properly handle relative symlinks#4275

Merged
efiop merged 1 commit into
treeverse:masterfrom
efiop:fix-4160
Jul 24, 2020
Merged

dvc: properly handle relative symlinks#4275
efiop merged 1 commit into
treeverse:masterfrom
efiop:fix-4160

Conversation

@efiop
Copy link
Copy Markdown
Contributor

@efiop efiop commented Jul 24, 2020

Fix #4160

Thank you for the contribution - we'll try to review it as soon as possible. 🙏

@efiop efiop changed the title dvc: properly handle relative symlinks [WIP] dvc: properly handle relative symlinks Jul 24, 2020
@efiop efiop changed the title [WIP] dvc: properly handle relative symlinks dvc: properly handle relative symlinks Jul 24, 2020
Copy link
Copy Markdown
Contributor

@pared pared left a comment

Choose a reason for hiding this comment

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

I wonder what about followin situation:

  1. We have a link in our data dir
  2. We add it
  3. We update link origin

I guess one would expect its state will also be updated in our data dir, right?

@efiop
Copy link
Copy Markdown
Contributor Author

efiop commented Jul 24, 2020

I guess one would expect its state will also be updated in our data dir, right?

@pared Great point! Potentially we could just keep the original link, but if someone would to think "oh, I've added it to dvc, so I can delete it now" we would get a broken link. From that standpoint it is just easier to replace the link with our own link (which in this test is copy, but might be symlink/hardlink/reflink). But let's definitely keep that use case in mind, maybe someone will come ask for it.

@efiop efiop merged commit 39c0bdb into treeverse:master Jul 24, 2020
@pared
Copy link
Copy Markdown
Contributor

pared commented Jul 24, 2020

Yeah, I guess there is no proper solution that would satisfy all use cases and expectations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

'dvc add dir' fails when 'dir' contains a file and a relative symlink on this file

2 participants