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.
|
|
|
|
-}
|
|
|
|
|
2023-04-10 21:03:41 +00:00
|
|
|
{-# LANGUAGE OverloadedStrings #-}
|
|
|
|
|
2018-10-25 21:23:53 +00:00
|
|
|
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
|