Would it be possible to make thin work in locked mode? In other words, could locked mode use hardlinks instead of symlinks then thin is set?

Such a combined mode would have all the benefits of locked mode (protection, easy-to-spot missing files) and of direct mode (no duplication of files). It would also (partially) solve the problems discussed in day 601 v7 default and symlinks for not-present unlocked files.

Here is an example of how this could work from the user prospective:

$ mkdir foobar && cd foobar/ && git init . && git annex init foobar
$ echo "aaaa" > a && echo "bbbb" > b

$ git config annex.thin true
$ git annex add a b
[...] ok
$ git annex sync
[...] ok
$ ls
a  b  # note: no symlinks

$ echo "foo" > a
bash: a: Permission denied

$ git annex drop --force a
$ ls
a@  b # note: symlink for missing file