Added annex.freezecontent-command and annex.thawcontent-command configs
authorJoey Hess <joeyh@joeyh.name>
Mon, 21 Jun 2021 18:40:20 +0000 (14:40 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 21 Jun 2021 18:40:52 +0000 (14:40 -0400)
commit4b1b9d7a83f0da71665658e6234e699e182cbddc
tree3df52f9961f13298c0b64590fa5deefcf87ed826
parentba62c3467b22964cfc2d36c2805cf3316df60e4c
Added annex.freezecontent-command and annex.thawcontent-command configs

Freeze first sets the file perms, and then runs
freezecontent-command. Thaw runs thawcontent-command before
restoring file permissions. This is in case the freeze command
prevents changing file perms, as eg setting a file immutable does.
Also, changing file perms tends to mess up previously set ACLs.

git-annex init's probe for crippled filesystem uses them, so if file perms
don't work, but freezecontent-command manages to prevent write to a file,
it won't treat the filesystem as crippled.

When the the filesystem has been probed as crippled, the hooks are not
used, because there seems to be no point then; git-annex won't be relying
on locking annex objects down. Also, this avoids them being run when the
file perms have not been changed, in case they somehow rely on
git-annex's setting of the file perms in order to work.

Sponsored-by: Dartmouth College's Datalad project
Annex/Init.hs
Annex/Perms.hs
CHANGELOG
Test.hs
Types/GitConfig.hs
doc/git-annex.mdwn
doc/internals/lockdown.mdwn
doc/todo/lockdown_hooks.mdwn