The v5 version had a few advantages over the v7 version (at least when no direct mode was involved); in particular:
- Annexed and plain git files could be kept in parallel
- Files that are under annex control are immediately recognized as such (in file managers by displaying a symlink icon)
- Never is a file readable with its wrong content (an absent file reads as ENOTFOUND rather than "/annex/...")
- Never do changes resulting from users' workflows (who checks out what where, who locks something) show up in the actual git history.
I'd like to configure my annex repositories to give those properties, but that may need some more options:
- Setting
* annex.largefiles=nothing
in.gitattributes
restores 1 (and can still be customized) - Customizing it or users locking files still leaves files in their v7locked state where they can be accidentally read or otherwise look like plain available files (2-4). Having a
annex.neverlock
option that plain-out rejects adding files in locked mode or locking them would keep history and file list clean. That should be agit annex config
option. - There could still be an
git annex adjust --locked
that gives users the option to have a locked adjust branch (or lock files in their own adjusted branch) without those changes propagating into every user's history.
When neverlock
is active and git add
is run on a largefile, it could reject adding the file, place the users in a --lock
adjusted branch, or add the file in a locked state.
"Having a annex.neverlock option that plain-out rejects adding files in locked mode" -- did you mean unlocked mode?
A related suggestion: auto-lock files after one edit
Related: ?lets discuss git add behavior
I agree that (1)-(4) were good properties. (4) could be mitigated by using
git commit --amend
to merge the lock/unlock change with the previous commit. But if the previous commit has been pushed to a shared repo, this could cause problems. Something like auto-lock files after one edit would restore (1)-(4), at the cost of requiring manual unlock to edit again as in v5."Having a annex.neverlock option that plain-out rejects adding files in locked mode" -- did you mean unlocked mode?
A related suggestion: auto-lock files after one edit
Make sense.