This commit is contained in:
amerlyq+annex@12121d70a602f094228689a0a24d348d478a8af1 2022-01-01 20:59:29 +00:00 committed by admin
parent 9c4712262b
commit e77ef584cc

View file

@ -0,0 +1,26 @@
### Please describe the problem.
Using adb special remote import/export corrupts all symlinks in main repo (by replacing them by plain text files).
### What steps will reproduce the problem?
Primary annex repo contains an absolute symlink to another annex repo (or whatever).
Exporting it through adb replaces it by plain text file (as android FS abstraction does not support symlinks).
Importing from adb copies that plain text file and deletes symlink already present in the repo,
treating it as a new file modified by user.
### What version of git-annex are you using? On what operating system?
git-annex version: 8.20211118-g23ee48898
### Please provide any additional information below.
Possible solutions:
1) if PC repo contains symlink -- continue to export it as a plain text file (less changes).
But on "import" compare its size with symlink size, and then compare content.
Don't do anything if they are the same.
Cavet: user won't be able to *intentionally* replace symlinks by plain files on remote. Too esoteric usecase to consider.
2) resolve symlink on PC and export actual file to android (probably most preferred workflow?).
But on "import" compare its size against followed symlink file size, and then its content.
Don't do anything if they are the same.
Replace symlink by actual file if they differ.