v7 for all repositories

* Default to v7 for new repositories.
* Automatically upgrade v5 repositories to v7.
This commit is contained in:
Joey Hess 2019-08-30 13:54:57 -04:00
parent 1558e03014
commit 3f0eef4baa
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
29 changed files with 127 additions and 482 deletions

View file

@ -10,7 +10,6 @@ module Command.Lock where
import Command
import qualified Annex.Queue
import qualified Annex
import Annex.Version
import Annex.Content
import Annex.Link
import Annex.InodeSentinal
@ -31,12 +30,7 @@ cmd = withGlobalOptions [jsonOptions, annexedMatchingOptions] $
seek :: CmdParams -> CommandSeek
seek ps = do
l <- workTreeItems ps
ifM versionSupportsUnlockedPointers
( withFilesInGit (commandAction . (whenAnnexed startNew)) l
, do
withFilesOldUnlocked (commandAction . startOld) l
withFilesOldUnlockedToBeCommitted (commandAction . startOld) l
)
withFilesInGit (commandAction . (whenAnnexed startNew)) l
startNew :: FilePath -> Key -> CommandStart
startNew file key = ifM (isJust <$> isAnnexLink file)