diff options
-rw-r--r-- | Command/Move.hs | 10 | ||||
-rw-r--r-- | doc/bugs/copy_fast_confusing_with_broken_locationlog.mdwn | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/Command/Move.hs b/Command/Move.hs index 623003e47..f49fe20e0 100644 --- a/Command/Move.hs +++ b/Command/Move.hs @@ -7,6 +7,8 @@ module Command.Move where +import Control.Monad (when) + import Command import qualified Command.Drop import qualified Annex @@ -84,7 +86,8 @@ toPerform dest move key = do -- and an explicit check is not done, when copying. When moving, -- it has to be done, to avoid inaverdent data loss. fast <- Annex.getState Annex.fast - isthere <- if fast && not move && not (Remote.hasKeyCheap dest) + let fastcheck = fast && not move && not (Remote.hasKeyCheap dest) + isthere <- if fastcheck then do (remotes, _) <- Remote.keyPossibilities key return $ Right $ dest `elem` remotes @@ -98,7 +101,10 @@ toPerform dest move key = do ok <- Remote.storeKey dest key if ok then next $ toCleanup dest move key - else stop -- failed + else do + when fastcheck $ + warning "This could have failed because --fast is enabled." + stop Right True -> next $ toCleanup dest move key toCleanup :: Remote.Remote Annex -> Bool -> Key -> CommandCleanup toCleanup dest move key = do diff --git a/doc/bugs/copy_fast_confusing_with_broken_locationlog.mdwn b/doc/bugs/copy_fast_confusing_with_broken_locationlog.mdwn index 2767b5aa9..47fc77fa4 100644 --- a/doc/bugs/copy_fast_confusing_with_broken_locationlog.mdwn +++ b/doc/bugs/copy_fast_confusing_with_broken_locationlog.mdwn @@ -2,3 +2,5 @@ Conversation moved from [[walkthrough/recover_data_from_lost+found]] to a proper bug. --[[Joey]] (Unfortunatly that scrambled the comment creation times and thus order.) + +> Added a message [[done]] --[[Joey]] |