Some filesystems, like BTRFS or ZFS have copy on write support, which means that if files are copied in a special way they share sectors until one of the files is edited. Implementing support would make files take up less space if they are in unlocked mode and not significantly edited.
Oh, nvm, there already seem to be some references in the code to it.
Maybe it should be added that it does that under https://git-annex.branchable.com/tips/unlocked_files/ under using less disk space?
Also, macOS uses a
-c
flag instead ofreflink
, according to the cp man page.