Run annex.thawcontent-command before deleting an object file

In case annex.freezecontent-command did something that would prevent
deletion.

Sponsored-by: Dartmouth College's Datalad project
This commit is contained in:
Joey Hess 2022-02-24 14:10:53 -04:00
parent 346007a915
commit f4b046252a
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 70 additions and 0 deletions

View file

@ -29,6 +29,7 @@ module Annex.Perms (
modifyContent,
withShared,
hasFreezeHook,
hasThawHook,
) where
import Annex.Common
@ -301,6 +302,9 @@ modifyContent f a = do
hasFreezeHook :: Annex Bool
hasFreezeHook = isJust . annexFreezeContentCommand <$> Annex.getGitConfig
hasThawHook :: Annex Bool
hasThawHook = isJust . annexThawContentCommand <$> Annex.getGitConfig
freezeHook :: RawFilePath -> Annex ()
freezeHook p = maybe noop go =<< annexFreezeContentCommand <$> Annex.getGitConfig
where