From e77ef584ccd5374d05868987e19fd2a01d49332b Mon Sep 17 00:00:00 2001 From: "amerlyq+annex@12121d70a602f094228689a0a24d348d478a8af1" Date: Sat, 1 Jan 2022 20:59:29 +0000 Subject: [PATCH] --- ...replaces_symlinks_by_plain_text_files.mdwn | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 doc/bugs/adb_replaces_symlinks_by_plain_text_files.mdwn diff --git a/doc/bugs/adb_replaces_symlinks_by_plain_text_files.mdwn b/doc/bugs/adb_replaces_symlinks_by_plain_text_files.mdwn new file mode 100644 index 0000000000..3a45b95eb0 --- /dev/null +++ b/doc/bugs/adb_replaces_symlinks_by_plain_text_files.mdwn @@ -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.