From a78b0555e1d46c4548cda3aaa1709040f6fa7f33 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 8 Jan 2011 15:54:14 -0400 Subject: New migrate subcommand can be used to switch files to using a different backend, safely and with no duplication of content. --- Command/Add.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Command/Add.hs') diff --git a/Command/Add.hs b/Command/Add.hs index bc869a67d..c74b726e3 100644 --- a/Command/Add.hs +++ b/Command/Add.hs @@ -42,11 +42,12 @@ perform (file, backend) = do stored <- Backend.storeFileKey file backend case stored of Nothing -> return Nothing - Just (key, _) -> return $ Just $ cleanup file key + Just (key, _) -> do + moveAnnex key file + return $ Just $ cleanup file key cleanup :: FilePath -> Key -> CommandCleanup cleanup file key = do - moveAnnex key file logStatus key ValuePresent link <- calcGitLink file key -- cgit v1.2.3