question came up on neurostars and I had no good answer: what would be the best filesystem to use on external drives which would be portable (mountable) across OSes and would provide git-annex with needed features (symlinks, permissions handling, and locking?).
I love BTRFS on Linux but I do not think it is (and neither ext* family) is portable. Is there any filesystem which would be portable across Windows/OSX/Windows and still work with git-annex without needing adjusted-branches mode?
Firstly, I don't think there is an agreement on what proper file permissions mean on local filesystems across OSes. Without a central authority what one denies the other can easily allow thus bypassing permissions. So basically you are semantically only left with permission "hints" or "suggestions" -- this file is to be treated read only, that file is supposed to be executable and so on -- that is, without any reference to a common user/group authority.
AFAIK, there's some cross-platform support for symlinks on say NTFS, at least between linux and windows. The problem is that NTFS symlinks are typed -- they are either directory or file symlinks and while git on windows can restore symlinks (with core.symlinks = true) post-checkout (for instance with
git restore
), it can't seem to be able to decide which kind it needs during checkout, so it simply places symlink contents as regular files at first and declares them modified.Considering that git's own handling of symlinks is lackluster on Windows, it's no wonder that Joey hasn't been very enthusiastic about adding the support for the regular indirect locked mode there. E.g., I'll refer you to this archived todo in Google's cache for context: https://webcache.googleusercontent.com/search?q=cache:Bu24xB2MR94J:https://git-annex.branchable.com/todo/utilising_the_mklink_command_on_windows_to_utilise_symlinks_and_therefore_indirect_mode_on_windows/
As for locking, Joey can probably expand on that subject.
All in all there are several obstacles to working with checked out files across platforms. As far as I can tell the only cross-platform format is a bare remote with permissive file modes which is of course a bit inconvenient for day-to-day work because usually you need that checked out worktree somewhere for your apps to operate on.
Locking is not a concern. git-annex can lock files on a FAT filesystem as well as on any other. (Network filesystems tend to be the ones with problems with locking.) Lacking permissions do mean that a
rm -rf
is more likely to delete annex objects, but a removable drive has a real risk of accidentially being reformatted, or physically damaged, and you can untrust it if any of those risks are too large.I do think that a bare repo on a removable drive can work well, if the point of the drive is to sneakernet data back and forth, or offload storage. Keep your local clone on the best available filesystem the OS provides and work in there. Used in this way, FAT is no worse than S3.