GIT_ANNEX_SHELL_APPENDONLY

Makes it allow writes, but not deletion of annexed content. Note that
securing pushes to the git repository is left up to the user.

This commit was sponsored by Jack Hill on Patreon.
This commit is contained in:
Joey Hess 2018-05-25 13:17:56 -04:00
parent 0003109f5d
commit 85f9360d9b
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
7 changed files with 120 additions and 50 deletions

View file

@ -26,6 +26,12 @@ readOnlyEnv = "GIT_ANNEX_SHELL_READONLY"
checkNotReadOnly :: IO ()
checkNotReadOnly = checkEnv readOnlyEnv
appendOnlyEnv :: String
appendOnlyEnv = "GIT_ANNEX_SHELL_APPENDONLY"
checkNotAppendOnly :: IO ()
checkNotAppendOnly = checkEnv appendOnlyEnv
checkEnv :: String -> IO ()
checkEnv var = checkEnvSet var >>= \case
False -> noop