diff options
author | Joey Hess <joey@kitenet.net> | 2011-03-19 14:33:24 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-03-19 14:33:24 -0400 |
commit | 828a84ba3341d4b7a84292d8b9002a8095dd2382 (patch) | |
tree | d1c854a9c3d48bd7256a7c5e1db8dfae75d81f68 /Upgrade.hs | |
parent | 33cb114be5135ce02671d8ce80440d40e97ca824 (diff) |
Add version command to show git-annex version as well as repository version information.
Diffstat (limited to 'Upgrade.hs')
-rw-r--r-- | Upgrade.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Upgrade.hs b/Upgrade.hs index 76dd156f8..d201cc73e 100644 --- a/Upgrade.hs +++ b/Upgrade.hs @@ -12,6 +12,9 @@ import Version import qualified Upgrade.V0 import qualified Upgrade.V1 +upgradableVersions :: [Version] +upgradableVersions = ["0", "1"] + {- Uses the annex.version git config setting to automate upgrades. -} upgrade :: Annex Bool upgrade = do @@ -19,5 +22,5 @@ upgrade = do case version of "0" -> Upgrade.V0.upgrade "1" -> Upgrade.V1.upgrade - v | v == currentVersion -> return True + v | v `elem` supportedVersions -> return True _ -> error "this version of git-annex is too old for this git repository!" |