shared repository content file permissions for v9
v9 will not need to write to annex content files in order to lock them, so freezeContent removes the write bit in a shared repository, the same as in any other repository. checkContentWritePerm makes sure that the write perm is not set, which will let git-annex fsck fix up the permissions. Upgrading to v9 will need to fix the permissions as well, but it seems likely there will be situations where the user git-annex is running an upgrade as cannot, so it will have to leave the write bit set. In such a case, git-annex fsck can fix it later. Sponsored-by: Dartmouth College's Datalad project
This commit is contained in:
parent
ff570ad363
commit
43f9d967ff
3 changed files with 50 additions and 19 deletions
|
@ -1,6 +1,6 @@
|
|||
{- git-annex repository versioning
|
||||
-
|
||||
- Copyright 2010-2021 Joey Hess <id@joeyh.name>
|
||||
- Copyright 2010-2022 Joey Hess <id@joeyh.name>
|
||||
-
|
||||
- Licensed under the GNU AGPL version 3 or higher.
|
||||
-}
|
||||
|
@ -54,3 +54,8 @@ setVersion (RepoVersion v) = setConfig versionField (show v)
|
|||
|
||||
removeVersion :: Annex ()
|
||||
removeVersion = unsetConfig versionField
|
||||
|
||||
versionNeedsWritableContentFiles :: Maybe RepoVersion -> Bool
|
||||
versionNeedsWritableContentFiles (Just v)
|
||||
| v >= RepoVersion 9 = False
|
||||
versionNeedsWritableContentFiles _ = True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue