git annex import
seems to unconditionally ignore all kinds of symbolic links in the source importtree remote. We have some "legacy" datasets that I would like to wholesale import into git-annex repositories, and they use symbolic links pointing at other files within the same directory to avoid some duplication.
Is there an option to make git annex import
not ignore those symlinks, that I have overlooked? If not then this is a request to have such an option.
I think it could either resolve the symlink, check that the target is within the to-be-imported directory, and import it just like a regular file if it is, or it could import the symlink as-is with no modifications.
See git-annex-import imports outside of directory where following symlinks on import turned into a serious foot bomb.
I understand those concerns, but I think skipping all symbolic links is doing too much in this case.
I am interested in preserving symbolic links that point at other files within the same to-be-imported directory. I think this could be done safely by either resolving the symlink and importing the target file if it is a file within the importtree directory, or just importing the symlink as a symbolic link into git. I am starting to prefer the latter, and since it wouldn't import any actual file content it would even be safe to import symlinks pointing outside of the importtree directory.
This is what a small part of these datasets looks like:
I would like to meaningfully preserve these symbolic links when using
git annex import
. Right now these paths are simply missing after the import.I think @Ilya_Shlyakhter has been asking for this as well in the linked bug report.