2018-10-25 21:23:53 +00:00
|
|
|
{- git-annex v6 -> v7 upgrade support
|
|
|
|
-
|
|
|
|
- Copyright 2018 Joey Hess <id@joeyh.name>
|
|
|
|
-
|
|
|
|
- Licensed under the GNU AGPL version 3 or higher.
|
|
|
|
-}
|
|
|
|
|
|
|
|
module Upgrade.V6 where
|
|
|
|
|
|
|
|
import Annex.Common
|
2022-01-19 17:06:31 +00:00
|
|
|
import Types.Upgrade
|
2018-10-25 21:23:53 +00:00
|
|
|
import Config
|
|
|
|
import Annex.Hook
|
|
|
|
|
2022-01-19 17:06:31 +00:00
|
|
|
upgrade :: Bool -> Annex UpgradeResult
|
2018-10-25 21:23:53 +00:00
|
|
|
upgrade automatic = do
|
|
|
|
unless automatic $
|
|
|
|
showAction "v6 to v7"
|
|
|
|
unlessM isBareRepo $ do
|
|
|
|
hookWrite postCheckoutHook
|
|
|
|
hookWrite postMergeHook
|
2022-01-19 17:06:31 +00:00
|
|
|
return UpgradeSuccess
|