[[!comment format=mdwn
 username="joey"
 subject="""comment 2"""
 date="2020-11-11T11:36:37Z"
 content="""
> 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).

Well, it does have the benefits of locked mode, but does it really gain
back any benefits of direct mode?

Direct mode didn't duplicate files. But locked mode with annex.thin doesn't
duplicate files either, except for on a filesystem that doesn't support
hard links. But this new mode relies on hard links too.

Direct mode allowed modifying files in place. But locked mode does too,
more safely than direct mode (except when using annex.thin, then it's the
same).

Direct mode represented missing content as dangling symlinks (on
filesystems that support them). And this seems to be the only benefit
of direct mode that this new mode would gain back.

If the benefit of this new mode is only that, all that's really
needed is for the missing files to be represented as symlinks. Earlier I
said:

> it could work though. Ie, have a git annex adjust mode that represents
> present files as unlocked, but with the write bits unset, and that
> represents missing files as symlinks.

I now see that unsetting the write bit is not necessary to get the only
benefit of this new mode. Instead, the unlocked files can work just like
usual, being a copy of the content. And if the user doesn't want to store
two copies, they can enable annex.thin to get hardlinks, allowing in-place
modification.

If it actually made sense to unset the write bit of unlocked
files, it could be a config independant from this new mode. But I don't
currently see any real benefit to doing that. As far as I can see,
this new mode + unset write bit does not have any advantages at all
compared with regular locked files.
"""]]
