remove the older move --force, which never behaved as documented and seems useless

* move: --force was accidentially enabling two unrelated behaviors
  since 6.20180427. The older behavior, which has never been well
  documented and seems almost entirely useless, has been removed.
* copy: --force no longer does anything.

This commit was sponsored by Øyvind Andersen Holm.
This commit is contained in:
Joey Hess 2018-05-21 13:20:40 -04:00
parent ca6f5be284
commit 2fabd7cdb5
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
5 changed files with 41 additions and 19 deletions

View file

@ -186,15 +186,13 @@ fromStart removewhen afile key ai src = case removewhen of
next $ fromPerform src removewhen key afile
fromOk :: Remote -> Key -> Annex Bool
fromOk src key = go =<< Annex.getState Annex.force
fromOk src key
| Remote.hasKeyCheap src =
either (const checklog) return =<< haskey
| otherwise = checklog
where
go True = either (const $ return True) return =<< haskey
go False
| Remote.hasKeyCheap src =
either (const expensive) return =<< haskey
| otherwise = expensive
haskey = Remote.hasKey src key
expensive = do
checklog = do
u <- getUUID
remotes <- Remote.keyPossibilities key
return $ u /= Remote.uuid src && elem src remotes