summaryrefslogtreecommitdiff
path: root/Command
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-05-09 15:04:07 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-05-09 15:04:07 -0400
commit036c90d79289ef3c14c28d69c9d8ab94fca1e841 (patch)
tree631dea4eac925dae7a24b0fde46ea813e574d2e4 /Command
parent5098ef192f7cf128836dab02fa424948003f8fd1 (diff)
annex.backend is the new name for what was annex.backends
It takes a single key-value backend, rather than the unncessary and confusing list. The old option still works if set. Simplified some old old code too. This commit was sponsored by Thomas Hochstein on Patreon.
Diffstat (limited to 'Command')
-rw-r--r--Command/Migrate.hs6
1 files changed, 2 insertions, 4 deletions
diff --git a/Command/Migrate.hs b/Command/Migrate.hs
index 8dfee9814..8924b1780 100644
--- a/Command/Migrate.hs
+++ b/Command/Migrate.hs
@@ -36,15 +36,13 @@ start file key = do
Nothing -> stop
Just oldbackend -> do
exists <- inAnnex key
- newbackend <- choosebackend =<< chooseBackend file
+ newbackend <- maybe defaultBackend return
+ =<< chooseBackend file
if (newbackend /= oldbackend || upgradableKey oldbackend key || forced) && exists
then do
showStart "migrate" file
next $ perform file key oldbackend newbackend
else stop
- where
- choosebackend Nothing = Prelude.head <$> orderedList
- choosebackend (Just backend) = return backend
{- Checks if a key is upgradable to a newer representation.
-