From 4f6c8222072ace33e3acedddd31637089ae474b6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 5 Nov 2013 16:42:59 -0400 Subject: v5 for direct mode, with automatic upgrade This includes storing the current state of the HEAD ref, which git annex sync is going to need, but does not make sync use it. --- Upgrade/V4.hs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Upgrade/V4.hs (limited to 'Upgrade') diff --git a/Upgrade/V4.hs b/Upgrade/V4.hs new file mode 100644 index 000000000..147ace559 --- /dev/null +++ b/Upgrade/V4.hs @@ -0,0 +1,23 @@ +{- git-annex v4 -> v5 uppgrade support + - + - Copyright 2013 Joey Hess + - + - Licensed under the GNU GPL version 3 or higher. + -} + +module Upgrade.V4 where + +import Common.Annex +import Config +import Annex.Direct + +{- Direct mode only upgrade. -} +upgrade :: Bool -> Annex Bool +upgrade automatic = ifM isDirect + ( do + unless automatic $ + showAction "v4 to v5" + setDirect True + return True + , return False + ) -- cgit v1.2.3